Search Unity

[Released] Mobile Social Plugin

Discussion in 'Assets and Asset Store' started by stanislav-osipov, Feb 21, 2014.

  1. mog-mog-mog

    mog-mog-mog

    Joined:
    Feb 12, 2014
    Posts:
    266
    Which facebook version are we using? Have we upgraded to Facebook 7+ SDK for ios 9?
     
  2. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    Yes, you can initialise Twitter manager with defined customer key and customer secret as following
    Code (CSharp):
    1. SPTwitter.Instance.Init("CONSUMER_KEY", "CONSUMER_SECRET");
    More additional information you can find in documentation here.
    Just provide your own Twitter customer key and secret.

    Best regards,
    Alex
     
  3. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    For now our plugin support Facebook SDK v6.2.2
    Official Facebook changelog you can find here.

    Just pay your attention to the next aspect.
    From official documentation of Facebook SDK v7.1.0
    So, we will consider about new Facebook SDK version in our team.
    Keep looking for future updates.

    Best regards,
    Alex
     
  4. Kanojo

    Kanojo

    Joined:
    Oct 6, 2015
    Posts:
    1
    I am using this latest plugin and I want to implement twitter share function with AndroidTwitterManager(not shareIntent).
    I saw every detail of your documentation about twitter function, but I can't log in to twitter. I put some dialog code to try to find out the problem, but failed. Even log-in screen not appeared. In contrary, facebook works like charm even I delete my facebook app. Is it a bug?(something like activity-order, etc...)

    I am using Nexus 5 with Lollipop, and Twitter offical application not installed / not logged on to browser too.
     
  5. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,

    In this case, you better contact support team directly via e-mail - support@stansassets.com
    Or you have to provide more additional information to make me able to help you.

    Feel free to ask any information you need. I am open to the conversation.

    Best regards,
    Alex
     
  6. Aldo

    Aldo

    Joined:
    Aug 10, 2012
    Posts:
    173
    Is there any way to share a custom image (Screenshot) or video on FaceBook?
     
  7. zehreken

    zehreken

    Joined:
    Jun 29, 2009
    Posts:
    112
    Hello,
    I'm trying to use the native share feature of the plugin, the related native app window opens without a problem but the parameters I sent do not show up in the fields. They are just empty. Happens on both iOS and Android devices. Any advice is appreciated.

    Edit: I can see the message in some apps, for example gmail app, but I can't see it in facebook app.
    This is how i use it;
    Code (csharp):
    1. SPShareUtility.ShareMedia("Hello caption", "Hello message", temp);
    Code (csharp):
    1. SPShareUtility.FacebookShare("Hello facebook message", temp);
    Edit 2: After further investigation, I have come across this page which says posting prefilled text is now disabled. Case closed.
     
    Last edited: Oct 19, 2015
  8. Voldemorten

    Voldemorten

    Joined:
    Apr 2, 2015
    Posts:
    3
    I'm having an issue with Twitter posting from the plugin. (I was also wondering about the empty Facebook post, but previous poster seems to have an explanation for that).

    I'm on version 7.1.1 of the plugin, and when I try to post to Twitter, it just fails with the "...because the connection to Twitter faile" message. Posting used to work, and I can't for the life of me figure out where it's going wrong. API key and secret are correctly set up. The error message I see in the XCode console is:

    SendMessage: object IOSSocialManager not found!
    -> applicationWillResignActive()
    2015-11-01 17:12:07.934 toughluck[1432:489271] plugin com.apple.share.Twitter.post invalidated

    If anyone can help me along the way, it would be greatly appreciated. It's literally one out of two issues blocking my release candidate build now, so I'm banging my head here :)

    Edit: I'm using SPShareUtility.TwitterShare for Tweets.
     
    Last edited: Nov 1, 2015
  9. yifan024

    yifan024

    Joined:
    Jun 5, 2013
    Posts:
    19
    I Have the same problem.
    SPShareUtility.FacebookShare("Hello facebook message", temp); will only pop up post and picture, but the message will not show. This is only happening to Facebook native post.
     
  10. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    There are two approaches to share screenshots on Facebook with Android Native plugin:
    • Native Sharing API. Detailed information you can find here.
    • Social sharing based on official Facebook Unity SDK. Detailed information here.
    Both approaches has functionality to share screenshots on Facebook.
    According to Facebook video sharing you may send feature request to Stan's Assets Support Team via e-mail - support@stansassets.com
    You request will be cousidered and most likely you will get video sharing feature on Facebook for your project.

    Best regards,
    Alex
     
  11. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    If you are using native app for sharing image and text, than text will bi ignored.
    It's guide of FB for example. So, you can share the image, but what text will be shared with this image - it's up to your application user.

    You can find additional information according to this case here.

    Cheers!
     
  12. Auger

    Auger

    Joined:
    Jun 30, 2014
    Posts:
    9
    Hi,
    New user here, I'm wondering if there's plans for more Facebook Playmaker actions? It would be appreciated since I'm new to C# and Unity. Looking for just basic profile information, email name ect

    Auger
     
  13. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    Please, could you provide the full set of Playmaker action for Facebook social functionality you need?
    We are constantly working on plugin's improvements.
    Most likely they will be added with following plugin update.

    Looking forward to your reply.
    Best regards,
    Alex
     
  14. Auger

    Auger

    Joined:
    Jun 30, 2014
    Posts:
    9
    Thanks for your reply.

    I'm basically interested in getting the basic profile information so an action for
    LoadUserData () would be helpful.
    And an action to gather all that information once LoadUserData has returned the results.
     
  15. akstntn

    akstntn

    Joined:
    May 28, 2013
    Posts:
    20
    Hello,
    I am trying to use InviteFriends( AppRequest ) to invite multiple friends.
    SPFacebook.Instance.InviteFriends( "My Game", "Play this game with me",
    "",myArrayOfFriendsList
    );
    I've got 400 bad request. I double-checked the myArrayOfFriendsList( 'string[] to' ) and I already logged in Facebook.
    Is there any way to fix this error?
    Best regards,
     
  16. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    I got your feature request. Our team constantly working on plugin improvements and new features.
    Playmaker action for LoadUserData will be added with following plugin update.
    If you need earlier access to this action, please, feel free to contact The Stan's Assets Support support@stansassets.com

    Best regards,
    Alex
     
  17. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    Please, could you provide the extended log from your Android device to make me able to find out the reason of such behavior?
    Just try to capture the moment of InviteFriends method call.

    By the way, what's the status of your application in Facebook developer console?
    Did your application pass the review?
    And what's the permission scope while you log into Facebook from your application?

    Cheers!
     
  18. akstntn

    akstntn

    Joined:
    May 28, 2013
    Posts:
    20
    could you provide the extended log from your Android device to make me able to find out the reason of such behaviour?
    - I got the error in Unity. I've attached the screenshots.

    1.By the way, what's the status of your application in Facebook developer console?
    - Tester
    2. Did your application pass the review?
    - not sure yet. The other programmer was working on the Facebook stuff.
    3. And what's the permission scope while you log into Facebook from your application?
    - scopes: user_about_me,user_friends,email,publish_actions,read_friendlists,user_games_activity,user_activities,user_likes

    Thank you!!!!!
     

    Attached Files:

  19. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    Got it! Just one more question.
    Please, could you provide me the code snippet with SPFacebook.Instance.AppRequest API method call?
    Please, provide LogCat logs from your Android device also.
    It will help me to find out the reason of such behavior.

    Looking forward to your reply.
    Best regards,
    Alex
     
  20. JeremyK

    JeremyK

    Joined:
    May 6, 2010
    Posts:
    13
    Is twitter instantly posting in the background being take out? I remember it used to be able to post in background without popup any window. I'm using IOS, twitter auth api, both " SPShareUtility.TwitterShare" and " SPTwitter.instance.Post" pop up confirmation window.
     
  21. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    To get Twitter posting in background 'silently' you have to call
    Code (CSharp):
    1. SPTwitter.instance.PostWithAuthCheck("Hello, I'am posting this from my app");
    The PopUp dialog window with Updating to twitter... message will take place with OAuth post to Twitter.

    Anyway, you may contact The Stan's Assets Support Team to get custom library without this PopUp and get true silent posting to Twitter.
    Please, feel free to request such a functionality via support@stansassets.com

    Best regards,
    Alex
     
  22. JeremyK

    JeremyK

    Joined:
    May 6, 2010
    Posts:
    13
    Thank you, I will.
     
  23. Auger

    Auger

    Joined:
    Jun 30, 2014
    Posts:
    9
    Getting this error from newest version 7.2 for Playmaker actions
    Tried with Facebook versions 6.2.2 and 7.2.2
    The new version is also not downloading Facebook SDK automatically anymore.

    Assets/Extensions/MobileSocialPlugin/Addons/PlayMakerActions/PlayMakerActions/Facebook/MSP_FB_LogIn.cs(51,52): error CS0246: The type or namespace name `FB_APIResult' could not be found. Are you missing a using directive or an assembly reference?
     
  24. Auger

    Auger

    Joined:
    Jun 30, 2014
    Posts:
    9
    Anyone know where I can download previous versions of this asset? The one linked from website doesnt work
     
    Last edited: Dec 13, 2015
  25. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    Mobile Social Plugin v7.2 does not contain Facebook SDK inside by default anymore.
    For now, the package has much-reduced size.
    So, developers should import any Facebook SDK version they want manually.

    To fix the Playmaker actions, please, feel free to replace FB_APIResult with FB_Result on your own.
    If any issues will take place - feel free to contact me or contact Stan's Assets Support Team via support@stansassets.com.

    Best regards,
    Alex
     
  26. michaeldaniels

    michaeldaniels

    Joined:
    Nov 23, 2015
    Posts:
    2
    If I use "SPShareUtility.FacebookShare(textToShare, tex);" or "SPShareUtility.TwitterShare(textToShare, tex);" how do I get a success/failure callback for Android? Am I supposed to be subscribing to the SPFacebook.instance and SPTwitter.instance functions? Or will that not work because I am using SPShareUtility?

    Thanks!
     
  27. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    With SPShareUtility the situation is following (in a case of Android platform).
    This approach is called sharing using native intents.
    So, intent with needed extras will be created and native Facebook or Twitter application will be started for actually sharing.
    There is no callback action for this approach.

    There is one more approach - actually, Facebook and Twitter sharing with additional setup needed and with additional callback actions.
    Please, take a look for Facebook and Twitter sharing on our documentation portal.
    I think it will be very useful for you.

    Best regards,
    Alex
     
  28. michaeldaniels

    michaeldaniels

    Joined:
    Nov 23, 2015
    Posts:
    2
    Is it possible to add in a feature for SPShareUtility to have a callback for Android?
    I am not using the authorized method for my app at the moment and don't plan to for a while (if any).

    Thanks!
     
  29. loko08

    loko08

    Joined:
    Oct 6, 2013
    Posts:
    57
    Hello Friends!!
    I am having a real hard time updating the plugin :/ and integrating it with the android native plugin ...

    I deleted the folders indicated, but once I update, the addEventListener function disappeared, and the manual still states that it should work...

    so what happened??
     
  30. loko08

    loko08

    Joined:
    Oct 6, 2013
    Posts:
    57
    So I kind of got past it, but now am having a whole different problem.

    Everytime I start my application on Android I try to check if the user is logged in by using this code:

    Code (CSharp):
    1.      
    2. if (SPFacebook.Instance.IsLoggedIn)
    3.         {
    4.             PDGrid.pFManager.LoginWithFB();
    5.         }
    6.  
    that calls this function:

    Code (CSharp):
    1.  
    2. if(!connected)
    3.         {
    4.             if (!SPFacebook.Instance.IsLoggedIn) // Si pudimos logearnos con Facebook
    5.             {
    6.                 SPFacebook.Instance.Login(); // si no intentamos conectarnos a fb
    7.             }
    8.             else
    9.             {
    10.                 ConnectToPlayfab();
    11.             }
    12.         }
    13.  
    It used to work just fine (with a previous version of both the FB SDK and the MSP), but even if the SPFacebook object says that it's LoggedIn, it won't give me the user data (no user id,no user access token, no nothing, always empty).

    I tried adding a function that would first load user data, and when debugging I can see the access token, and the information from my profile just fine, but then again when I try getting that information from the SPFacebook.Instance it's always empty ("")



    My main concern is that it works fine if the app data is deleted from the phone, meaning that the first login on any device with facebook (the one that calls the Login function) works just fine and populates the user data just fine. It's just when I want to keep the session going when I have big issues.


    Any help with this?? Am dying here.
     
    Last edited: Jan 13, 2016
  31. chmodseven

    chmodseven

    Joined:
    Jul 20, 2012
    Posts:
    120
    Hi,

    I've installed Ultimate Mobile 4.3.2 and Mobile Social 7.3.1 which appear to be the most current as of today. On the Mobile Social settings however, I'm getting:

    Update Required:
    Resources version: 7.1.1 Plugin version: 7.3.1

    There's a "How to update" button but the instructions aren't very clear - it talks about updating all assets at the same time, but since I do have all the latest versions, then shouldn't these be all in sync with the resources folders? Please advise.

    I also have Ad Remediation asset and Facebook SDK installed as well, in case that helps identify the problem, latest versions of these again.

    EDIT: One more thing: when I was experimenting trying to fix it, if I click Reinstall on the Mobile Social settings, it will remove the issue but then the plugin version drops back to 7.1.1 which is not ideal obviously.

    Regards,
    Shannon
     
  32. Unititi

    Unititi

    Joined:
    Mar 6, 2013
    Posts:
    20
    can I upload screenshot to instagram with 'hashtag'??
    How can I do this. plz help!
     
  33. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    To post image with text including hashtags use following code-snippet

    Code (CSharp):
    1. AndroidInstagramManager.instance.OnPostingCompleteAction += OnPostingCompleteAction;
    2. AndroidInstagramManager.instance.Share(imageForPosting, "I am posting from my app #hashtag1 #hashtag2");
    3.  
    4. //Posting callback method
    5. void OnPostingCompleteAction (InstagramPostResult result) {
    6.     if(result == InstagramPostResult.RESULT_OK) {
    7.         Debug.Log("Posting Successful");
    8.     } else {
    9.         Debug.Log("Posting failed with error code " + result.ToString());
    10.     }
    11. }
    Best regards,
    Alex
     
  34. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    There is no such a feature for now.
    Most likely this functionality will be added with future plugin updates.

    For now, just new intent with appropriate extras will be sent to the native application installed on a device.
    Whether it will be sent or not - it all will be up to the user itself (press 'Share' button or 'Cancel').

    Cheers!
     
  35. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    Code refactoring took place few updates ago.
    Old Flash-Like event system was completely removede from all of our plugins.
    All the functionality rely on new Action-Events system.
    Please, check new documentation guidelines.
    If any additional questions will take place - I am open to the conversation.

    Cheers!
     
  36. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    I think some update issue took place.
    Please, replace SocialPlatformSettings.cs script in your project with the file from attachment.
    All the issues should be fixed and you will be ready to go with all the latest plugins versions.

    Best regards,
    Alex
     

    Attached Files:

  37. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    You have the interesting case of your project.
    Have you contacted The Stan's Assets Support Team already?
    Please, contact if not via support@stansassets.com

    I think few additional tests will be needed to perform to find out the reason for such behavior.
    Provide as more detailed information as you can and ask Support Team for assistance.
    If you have any additional questions - I am open to the conversation.

    Best regards,
    Alex
     
  38. Unititi

    Unititi

    Joined:
    Mar 6, 2013
    Posts:
    20

    really thanks for answer quickly Alex!
    In my case. I made button for share to instagram with this script.
    This script works when I clicked sharingbutton without hashtags.

    ---------------
    public void ShareInstaScreen() {
    StartCoroutine(PostInstagramScreenshot());
    }


    private IEnumerator PostInstagramScreenshot() {
    yieldreturnnewWaitForEndOfFrame();

    intwidth = Screen.width;
    intheight = Screen.height;
    Texture2Dtex = newTexture2D( width, height, TextureFormat.RGB24, false );

    tex.ReadPixels( newRect(0, 0, width, height), 0, 0 );
    tex.Apply();

    AndroidSocialGate.StartShareIntent("Hello Share Intent", "This is my text to share", tex, "insta");
    Destroy(tex);
    }
    ---------------------------------

    How can I add for your solution in my case.. Sorry I am newbie :(
     
    Last edited: Jan 26, 2016
  39. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Please, try to change your code a little bit
    Code (CSharp):
    1. public void ShareInstaScreen() {
    2. StartCoroutine(PostInstagramScreenshot());
    3. }
    4.  
    5.  
    6. private IEnumerator PostInstagramScreenshot() {
    7. yieldreturnnewWaitForEndOfFrame();
    8.  
    9. intwidth = Screen.width;
    10. intheight = Screen.height;
    11. Texture2Dtex = newTexture2D( width, height, TextureFormat.RGB24, false );
    12.  
    13. tex.ReadPixels( newRect(0, 0, width, height), 0, 0 );
    14. tex.Apply();
    15.  
    16. AndroidSocialGate.StartShareIntent("Hello Share Intent", "This is my text to share #hashtag1 #hashtag2", tex, "insta");
    17. Destroy(tex);
    18. }
    I added #hashtag1 and #hashtag2 to your Instagram posting message
     
  40. Unititi

    Unititi

    Joined:
    Mar 6, 2013
    Posts:
    20
  41. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    There is another one approach I mentioned earlier

    Code (CSharp):
    1.  
    2. public void ShareInstaScreen() {
    3.     StartCoroutine(PostInstagramScreenshot());
    4. }
    5.  
    6. private IEnumerator PostInstagramScreenshot() {
    7.     yield return new WaitForEndOfFrame();
    8.  
    9.     intwidth = Screen.width;
    10.     intheight = Screen.height;
    11.     Texture2Dtex = newTexture2D( width, height, TextureFormat.RGB24, false );
    12.     tex.ReadPixels( newRect(0, 0, width, height), 0, 0 );
    13.     tex.Apply();
    14.    
    15.     AndroidInstagramManager.instance.OnPostingCompleteAction += OnPostingCompleteAction;
    16.     AndroidInstagramManager.instance.Share(tex, "I am posting from my app #hashtag1 #hashtag2");
    17.     Destroy(tex);
    18. }
    19.  
    20. //Posting callback method
    21. void OnPostingCompleteAction (InstagramPostResult result) {
    22.    if(result == InstagramPostResult.RESULT_OK) {
    23.        Debug.Log("Posting Successful");
    24.    } else {
    25.        Debug.Log("Posting failed with error code " + result.ToString());
    26.    }
    27. }
    28.  
    Please, try it on your own.

    Best regards,
    Alex
     
  42. NINPO

    NINPO

    Joined:
    Jun 21, 2015
    Posts:
    9
    How can I combine IOSDeploy MobileSocialPlugin and AndroidNative ?
    Why there is so many incompatibilities between your's plugin ? Everytime i want to update. I just got a big headeach.

    If i install IOSDeploy First and MobileSocialPlugin after. IOSDeploy ask me to buy the plugin.... and i can't use it.
    If i install MobileSocialPlugin first and IOSDeploy Unity give me error on PluginsInstalationUtil and SA_EditorTool

    Why i need to buy and install IOSDeploy to be able to add Social.Framwork and MessageUI.Framework for postprocessing build on IOS ?

    You're plugin can be great but sometimes is really a shame.
     
  43. Unititi

    Unititi

    Joined:
    Mar 6, 2013
    Posts:
    20
    I have problem screenshot sharing with instagram.
    When I share to instagram. Layout(made by instagram) app work instead of Insta app.
    I can share to instagram when Layout app is deleted. but I need to share to instagram without delete layout app.
    How can I running with instagram without delete layout app. Because Lot of my user have layout app....
    ----------------------------------------------------------------
    privateIEnumeratorPostInstagramScreenshot() {
    yieldreturnnewWaitForEndOfFrame();

    intwidth = 1080;
    intheight = 1920;
    Texture2Dtex = newTexture2D( width, height, TextureFormat.RGB24, false );

    tex.ReadPixels( newRect(0,0, 1080, 1920), 0, 0 );
    tex.Apply();

    AndroidSocialGate.StartShareIntent("Hello Share Intent", "This is my text to share", tex, "instagram");
    Destroy(tex);
    }

    Help me!

    http://postimg.org/image/854mpc3fr/
     
  44. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    Do you mean share to Instagram in the background mode?
     
  45. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    I added your report to our bug tracker.
    Additional testing will take place on our side.
    If any issue will take place - fix will be provided.

    You can ask for the status of this case The Stan's Assets Support Team directly.

    Best regards,
    Alex
     
  46. Unititi

    Unititi

    Joined:
    Mar 6, 2013
    Posts:
    20
    QUOTE="AlexRay, post: 2492681, member: 654252"]Hello,
    Do you mean share to Instagram in the background mode?[/QUOTE]

    problem about sns sharing.

    This is button for sharing instagram. But layout app is run instead of Instagram.
     
  47. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    As I can see from the video you provided that you have an application called Layout available for sharing.
    But do you have Instagram application installed on your device?
     
  48. Unititi

    Unititi

    Joined:
    Mar 6, 2013
    Posts:
    20
    Hm..I mean....I need share screenshot to INSTAGRAM...when I press button as you can see...
    But Layout app is run.. I don't want to run LAYOUT!

    When I uninstall LAYOUT app. INSTAGRAM Sharing is work fine...
    But I need to only run INSTAGRAM without not uninstall LAYOUT

    I don't know why LAYOUT run!! ....I write code like below red "instagram".... why LAYOUT APP run..........
    plz help me. sorry for my english. You can't understand?... T_T

    AndroidSocialGate.StartShareIntent("Hello Share Intent", "This is my text to share", tex, "instagram");


    My app need only INSTAGRAM SHARING...

     
    Last edited: Feb 3, 2016
  49. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Ok, I see.

    This is quite strange behavior with the Layout app on your device.
    Did you test on any other device? What kind of behavior takes place?
     
  50. Unititi

    Unititi

    Joined:
    Mar 6, 2013
    Posts:
    20
    Yes I did. Situation is same on any other device. In both apps installed instagram and layout