-
Notifications
You must be signed in to change notification settings - Fork 1
- The Facebook SDK for Unity only supports iOS version 7.0 and above.
- Make sure That Social API is enabled under the plugin editor settings.
- Make sure, that Texture2D you trying to share is Readable.
The code snippet below will demonstrate Instagram posting example:
using SA.iOS.Social;
...
ISN_Instagram.Post(screenshot);
We can also find out posting result
using SA.iOS.Social;
...
ISN_Instagram.Post(screenshot, HandleOnInstagramPostResult);
void HandleOnInstagramPostResult(SA_Result result) {
if (result.IsSucceeded) {
Debug.Log("Post Success!");
} else {
Debug.Log("Post Failed! Error code: " + result.Error.Code);
}
}
In case if an error has occurred, the result.Error.Code will contain one of the following error codes:
- 1 - The wasn't installed on a device.
- 2 - The user cancelled posting.
- 3 - The system version error.
- 4 - The internal exception.
Note: With the latest Instagram app the image caption will be ignored. Instagram provides documentation on iOS hooks. This documentation does not make any mention of a caption parameter. It means that this doesn't seem to be an officially supported use case. But caption parameter was working correctly with the previous Instagram app version. Now they are probably sticking with the same policy as Facebook. "Users should share only own thoughts" and any text provided by developer will be ignored. However, we can always put some text on the image we are sharing :) This behavior may change in future, so keep your sharing text.
Reliable and high-quality Unity Development service. Let's Talk!
Website | AssetStore | LinkedIn | Youtube | Scripting Reference
- Getting Started
- Authentication
- Game Center UI
- Leaderboards
- Default Leaderboard
- Achievements
- Saving A Game
- Access Point
- iTunes Connect Setup
- StoreKit Initialization
- Purchase flow
- Receipt Validation
- Store Review Controller
- Storefront API
- Subscription Offers