Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[Released] Mobile Social Plugin

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

  1. The_BenEvans

    The_BenEvans

    Joined:
    Jul 31, 2012
    Posts:
    139
    Hi, we've been using MSP in our apps and it's really good so far.

    One thing is there seems to be quite heavy compression when sending the image over the native method. Is there something we should be considering with the texture we're sending, like the texture format? Or is it out of our control?

    Cheers
     
    Last edited: Mar 17, 2015
  2. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    @Hoia The installation process if automatic you do not have do anything by yourself. However if you do not have Assets/Plugins/Android/facebook folder, it means that something was wrong during installation problems. I can suggest to cope facebook folder to correct location manually, or simply contact the support team, We will clean up your project and fix the issues.
    Unforchinatly I can not tell why is automation installation was failed. Did you have any error after pressing the install button.
    As I sad you can always contain support team at stans.assets@gmail.com referring to this post nad ask to clean up your project.


    It's our of our control unfortunately. It's up to application we use to post the texture. For example Twitter is applaying much more havy compression than facebook, when Google+ seems to not harming quility at all.

    Cheers!
     
  3. Hoia

    Hoia

    Joined:
    Mar 14, 2015
    Posts:
    2
    @lacost I had no errors during the installation. I contacted the support team and they sent me the facebook folder that was missing in my project. Copying the facebook folder to Assets/Plugins/Android solved the problem.

    Just for you to know: I made a whole new projects and did nothing but import the Mobile Social Plugin. No Errors occured during the installation and again I didn't have the required facebook folder in Assets/Plugins/Android...

    Thanks for the quick support!
     
  4. purbanics

    purbanics

    Joined:
    Mar 6, 2014
    Posts:
    19
    Just tested the 2 Instagram Playmaker actions and was delighted to find that they work without any problem.

    The post screenshot and the post texture both worked nicely when Instagram was logged in on the Android device.
    They also worked when Instagram was logged OUT. Took me to Instagram and I could log in and then post. Good.

    There is one problem: When Instagram is not installed on device pressing the buttons to post screenshot or post texture does nothing.

    From the documentation:
    "
    If you got Failed Posting event, you can find out reason why. Fail event will contain one of
    following constants as error code:
    public enum InstaErrorCode {
    NO_APPLICATION_INSTALLED,
    USER_CANCELLED,
    SYSTEM_VERSION_ERROR,
    INTERNAL_EXCEPTION
    }
    Example of OnPostFailed method implementation:
    private void OnPostFailed(CEvent e) {
    InstaErrorCode error = e.data as InstaErrorCode;
    Debug.Log("Posting failed with error code " + error.ToString())
    }
    "

    It would be great, that in case of these different fail cases your playmaker actions would do different things.
    NO_APPLICATION_INSTALLED --- take user to google play store Instagram or iOS store.
    USER_CANCELLED, --- go to a different state
    SYSTEM_VERSION_ERROR, --- go to a different state
    INTERNAL_EXCEPTION --- go to a different state

    Please make this improvement.
    Thanks in advance.
     
  5. purbanics

    purbanics

    Joined:
    Mar 6, 2014
    Posts:
    19
    I am using 3 Playmaker actions to post screenshots to FB, Twitter and Instagram.
    Please see screenshot attached. (Of course I am not using these 3 in the same state, just placed them so I can easily show in one screenshot.)

    1.
    The screenshots work perfectly. They could be a bit higher resolution, less compressed though. Is there a way to modify the compression ratio of the screenshots?

    2.
    There is a problem with the text that should be included. In the case of the Twitter action it works nicely: the text I enter there, appears above the screenshot and the user can edit/delete before posting.
    BUG: In the case of FB and Instagram the text does not appear and is not posted.
     

    Attached Files:

  6. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Hey @Hoia thx a lot for the valuable report and feedback.

    @purbanics thx for reporting issue with the Playmaker actiuon we will fix it in upcoming version.
    Cheers!
     
  7. molmote88

    molmote88

    Joined:
    Jun 20, 2014
    Posts:
    5
    Hi, I'm trying to add social sharing features to my game.
    Can your plugin do stuff like
    1. Check If user canceled twitter posting on ios ( I saw TwitterEvents.POST_FAILED, but it's used nowhere )

    2. since your example app only provided link to facebook page ( not direct link to like that page ), I'm assuming I'd have to check if user liked the page using Likes API after user get back to the app. Is it correct?

    3. for user to follow our account in twitter, I may have to do something like..
    params.put("screen_name",screenName);
    params.put("follow", "true");
    getClient().post(apiUrl,params,handler);
    Is this possible to implement this without using twitter native api?

    thanks.
     
  8. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    It's possible if you will use twitter OAuth API
    https://unionassets.com/mobile-social-plugin/coding-guidelines-147

    Yep
    Unforchinatly I do not have such feature currently. But I will treat as feature request for the future development.

    Cheers!
     
  9. blueFire

    blueFire

    Joined:
    Nov 27, 2010
    Posts:
    68
    Does this work in the Unity Editor or does the application have to be build, the .apk file uploaded to an android device and run on the android device for it to work?

    Jason
     
  10. BulchyC

    BulchyC

    Joined:
    Jan 8, 2014
    Posts:
    4
    Is it possible to use the Scores API for Global Leaderboards or can they only include Facebook Friends?
     
  11. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    All Social API should be tested on the real device. The only exception is FB oAuth API, which can be tested in editor.
    Cheers!

    Sorry, not sure I got the question.
     
  12. BulchyC

    BulchyC

    Joined:
    Jan 8, 2014
    Posts:
    4
    Ah, well I currently have a leaderboard set up that shows the top 5 scores from my Facebook friends. I was wondering if it is possible to have a leaderboard that includes ALL players, not just the ones that I'm friends with on Facebook.
     
  13. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    I got it, well this feature was already been requested and should appear with the next update.
    Cheers!
     
  14. blueFire

    blueFire

    Joined:
    Nov 27, 2010
    Posts:
    68
    For some reason when I try using Twitter and Facebook it sends an email on android. Perhaps I have something set up wrong on the device. I am using the following code.

    Twitter

    Code (CSharp):
    1. SPShareUtility.TwitterShare("This is my text to share");
    Facebook

    Code (CSharp):
    1. SPShareUtility.FacebookShare("This is my text to share");
     
  15. blueFire

    blueFire

    Joined:
    Nov 27, 2010
    Posts:
    68
  16. BulchyC

    BulchyC

    Joined:
    Jan 8, 2014
    Posts:
    4
    Lovely stuff! Thanks as always for making my life so much easier :D
     
  17. siddharth3322

    siddharth3322

    Joined:
    Nov 29, 2013
    Posts:
    1,049
    I want to share game logo and text in facebook profile. For this thing right now I am using this plugin.

    At present in game two scenes exist, one is menu and other is game play. For facebook sharing I have created DontDestroyOnLoad object so that initialization happen only once.

    This object I am creating in menu scene and become available to game play scene. On press of sharing button facebook login screen come up and I login in that one then no process occur related to sharing.

    I have not adopted simple approach just create all the things in game scene and use it because game scene loaded multiple time so that initialization of facebook also happen multiple time.

    Basically using above approach I can't able to share. Although I have checked same thing with other game with single scene and everything works perfectly in that.

    Please give some help in this.
     
  18. siddharth3322

    siddharth3322

    Joined:
    Nov 29, 2013
    Posts:
    1,049
    For my other game, I am facing this issue using this plugin. Please give some suggestion to me.

    I am trying to post image and text on facebook account but when I use different account than my facebook game app account it rejects my posting displaying following message on xcode

    Code (CSharp):
    1. 403: forbidden
    2. Replacements.RemotingServices:CreateClientProxy(Type, String, Object[])
    3. UnityEngine.Debug:Internal_Log(Int32, String, Object)
    4. UnityEngine.Debug:LogWarning(Object)
    5. SPFacebook:PostCallBack(FBResult)
    6. Facebook.FacebookDelegate:Invoke(FBResult)
    7. AppManager:set_IsLandscapeModeActive(Boolean)
    8. Facebook.<Start>c__Iterator0:MoveNext()
    9. Replacements.RemotingServices:CreateClientProxy(Type, String, Object[])
    10.  
    11. (Filename: /Users/builduser/buildslave/unity/build/artifacts/iPhonePlayer-armv7-il2cppGenerated/UnityEngineDebug.cpp Line: 56)
    12. Opps, post failed, something was wrong
    13. Replacements.RemotingServices:CreateClientProxy(Type, String, Object[])
    14. UnityEngine.Debug:Internal_Log(Int32, String, Object)
    15. UnityEngine.Debug:Log(Object)
    16. FacebookPosting:OnPostFailed(CEvent)
    17. DataEventHandlerFunction:Invoke(CEvent)
    18. AppManager:set_IsLandscapeModeActive(Boolean)
    19. EventDispatcher:dispatch(Int32, Object, String)
    20. EventDispatcher:dispatch(String, Object)
    21. AppManager:set_IsLandscapeModeActive(Boolean)
    22. SPFacebook:PostCallBack(FBResult)
    23. Facebook.FacebookDelegate:Invoke(FBResult)
    24. AppManager:set_IsLandscapeModeActive(Boolean)
    25. Facebook.<Start>c__Iterator0:MoveNext()
    26. Replacements.RemotingServices:CreateClientProxy(Type, String, Object[])
    27.  
    28. (Filename: /Users/builduser/buildslave/unity/build/artifacts/iPhonePlayer-armv7-il2cppGenerated/UnityEngineDebug.cpp Line: 56)
    29.  
    At login time, I am asking for following permissions,

    Code (CSharp):
    1.  SPFacebook.instance.Login ("email,publish_actions");
    Before same code working for me but now it creating problem for me. I think facebook has updated some of its policy. Please give some opinions in this.
     
  19. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Is the FB or Twitter app installed on your device?

    @siddharth3322 Why are you decided to got with oAuth if you are using sharing only?
    • I am not sure I got correctly your issue with the multiple scenes. So why posting is failed on another scene?
    • about second issue you can post only from developer account before your app review and approved via facebook team.
    Cheers!
     
  20. siddharth3322

    siddharth3322

    Joined:
    Nov 29, 2013
    Posts:
    1,049
    @lacost , Thanks for your reply. Few day ago I have purchased your new plugin after upgrading to new one I have this question.

    First lets discuss second question that is more frustrating me, For this I just want to share image and text on player wall.
    I have installed facebook and twitter app both on my iPad. Problem is for facebook sharing only, in twitter I don't have any problem.

    I created facebook app with basic permission only that is by default given.
    Following are the list of permissions :
    - email
    - public_profile
    - user_friends

    So I didn't submit the facebook app for review. This is the condition from my side. Using this environment I am trying to share text and image on player wall. It working for account in which I have created facebook app but when I login with different account in facebook then it gives me above error.

    Please help me in this.
     
  21. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Well, your app should have publish permissions to be able to post something on the player wall.
     
  22. siddharth3322

    siddharth3322

    Joined:
    Nov 29, 2013
    Posts:
    1,049
    Means as per your suggestion I have to add publish permission in my facebook app. right?
    Then I have to submit my facebook app to review.

    How much time they will take to approve any facebook app?
     
  23. MacyK

    MacyK

    Joined:
    May 10, 2013
    Posts:
    15
    Thanks for making the plugin!
    I am having some problem to build it on IOS even after I imported the binary.

    Here are the erros in XCODE:

    "__twitterPostWithMedia", referenced from:





    IOSTwitterManager__twitterPostWithMedia_m1653(Object_t*, String_t*, String_t*, MethodInfo*) in Bulk_Assembly-CSharp_2.o





    (maybe you meant: _IOSTwitterManager__twitterPostWithMedia_m1653_MethodInfo, __Z45IOSTwitterManager__twitterPostWithMedia_m1653P8Object_tP8String_tS2_P10MethodInfo )





    "__twitterAuthificateUser", referenced from:





    IOSTwitterManager__twitterAuthificateUser_m1651(Object_t*, MethodInfo*) in Bulk_Assembly-CSharp_2.o





    (maybe you meant: _IOSTwitterManager__twitterAuthificateUser_m1651_MethodInfo, __Z47IOSTwitterManager__twitterAuthificateUser_m1651P8Object_tP10MethodInfo )





    "__twitterLoadUserData", referenced from:





    IOSTwitterManager__twitterLoadUserData_m1650(Object_t*, MethodInfo*) in Bulk_Assembly-CSharp_2.o





    (maybe you meant: _IOSTwitterManager__twitterLoadUserData_m1650_MethodInfo, __Z44IOSTwitterManager__twitterLoadUserData_m1650P8Object_tP10MethodInfo )





    "__twitterPost", referenced from:





    IOSTwitterManager__twitterPost_m1652(Object_t*, String_t*, MethodInfo*) in Bulk_Assembly-CSharp_2.o





    (maybe you meant: _IOSTwitterManager__twitterPostWithMedia_m1653_MethodInfo, _IOSTwitterManager__twitterPost_m1652_MethodInfo , __Z45IOSTwitterManager__twitterPostWithMedia_m1653P8Object_tP8String_tS2_P10MethodInfo , __Z36IOSTwitterManager__twitterPost_m1652P8Object_tP8String_tP10MethodInfo )





    "__twitterInit", referenced from:





    IOSTwitterManager__twitterInit_m1649(Object_t*, MethodInfo*) in Bulk_Assembly-CSharp_2.o





    (maybe you meant: _IOSTwitterManager__twitterInit_m1649_MethodInfo, __Z36IOSTwitterManager__twitterInit_m1649P8Object_tP10MethodInfo )





    "__instaShare", referenced from:





    IOSInstagramManager__instaShare_m1620(Object_t*, String_t*, String_t*, MethodInfo*) in Bulk_Assembly-CSharp_2.o





    (maybe you meant: _IOSInstagramManager__instaShare_m1620_MethodInfo, __Z37IOSInstagramManager__instaShare_m1620P8Object_tP8String_tS2_P10MethodInfo )





    ld: symbol(s) not found for architecture arm64
     

    Attached Files:

  24. siddharth3322

    siddharth3322

    Joined:
    Nov 29, 2013
    Posts:
    1,049
    I have lots of error like this.
    Then I have added ISNDataConvertor.h, ISNDataConvertor.m, SocialGate.h and SocialGate.m files in Build Phase -> Compile Sources section of XCode.

    After doing this step, There is no error in my build.
     
  25. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Depends of the app. but if you need only posting you can use native posting approach. You can read about diferencies here:
    https://unionassets.com/mobile-social-plugin/coding-guidelines-134


    Errors saying that native API wasn't added to your Xcode project. It can be the installation issue, or if you migrated from one version Unity to another without reinstalling the plugin.
    • try to reinstall the plugin
    • if the same issues will appear please contact the support team and we will help you asap.

    Cheers!
     
  26. plotlessplot

    plotlessplot

    Joined:
    Sep 16, 2012
    Posts:
    28
    I've been trying to build for iOS with the new 6.4 update, but I always get this error:


    Any idea on what I have to do to fix these errors?


    EDIT:
    Just found a solution. All I needed to do was add the MessageUI framework in the Build Phases menu.

    Unfortunately, I now have other errors. I've since removed the Facebook SDK and now I get three semantic issues in Xcode:


    With the latest versions I always get errors whenever I remove the Facebook SDK. Is there a specific way to do it so that it doesn't mess up the build?
     
    Last edited: May 6, 2015
  27. siddharth3322

    siddharth3322

    Joined:
    Nov 29, 2013
    Posts:
    1,049
    One more issue I am facing using this plugin.
    I want to implement native facebook and twitter sharing in my game.

    I have implemented following code after using your latest launched plugin 6.4;

    Code (CSharp):
    1. public void PostOnFacebook ()
    2.     {
    3.  
    4.         StartCoroutine (PostFBScreenshot ());
    5.     }
    6.  
    7.     private IEnumerator PostFBScreenshot ()
    8.     {
    9.         yield return new WaitForEndOfFrame ();
    10.         // Create a texture the size of the screen, RGB24 format
    11.         int width = Screen.width;
    12.         int height = Screen.height;
    13.         Texture2D tex = new Texture2D (width, height, TextureFormat.RGB24, false);
    14.         // Read screen contents into the texture
    15.         tex.ReadPixels (new Rect (0, 0, width, height), 0, 0);
    16.         tex.Apply ();
    17.  
    18.         if (DataStorage.RetrieveTouchSteering () == GameConstants.ON)
    19.             SPShareUtility.FacebookShare ("I've just travelled " + DataStorage.RetrieveTouchControlBestScore () + "M distance" + " in #DinoRunner \n" + "Can you beat it! \n"
    20.                 + "\nhttp://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=988898890&pageNumber=0&sortOrdering=2&type=Purple+Software&mt=8", tex);
    21.         else
    22.             SPShareUtility.FacebookShare ("I've just travelled " + DataStorage.RetrieveTiltControlBestScore () + "M distance" + " in #DinoRunner \n" + "Can you beat it! \n"
    23.                 + "\nhttp://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=988898890&pageNumber=0&sortOrdering=2&type=Purple+Software&mt=8", tex);
    24.        
    25.         Destroy (tex);
    26.     }
    After using above code, I can't able to post text with image specially problem come across in iPhone 5 and 6.
    In iPad, iPhone 4s and iPod it works perfectly.
    So why this problem is happening is totally out of my mind.

    This image is from iPad
    ipad.PNG



    This image is from iPhone 6

    iphone6.jpg


    You can check same thing with uploaded game

    https://itunes.apple.com/us/app/space-snakes/id984443167?mt=8

    Please give fast reply, I have to upload new build after making correction.
     
  28. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
  29. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Hey @theplotlessplot how did you remove FB SDK? Have you used plugin editor menu or just removed it manually?
    Cheers!
     
  30. siddharth3322

    siddharth3322

    Joined:
    Nov 29, 2013
    Posts:
    1,049
    Hi, Thanks for your reply.

    I have read both post in that they have said in v30 also same problem remains.

    https://developers.facebook.com/bugs/949486035103197/

    Then what I have to do?
    I want to share both text and image in facebook.
    Please give some suggestion.
     
  31. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    For now MobileSocial Plugin has updated PlayMaker actions.
    Feature you requested was implemented successfully and will be available in following plugin update.
    Also you will get an updated plugin version with private message.

    According to your next message
    You are using native sharing API. As a result, MobileSocial plugin send the intent with image data to Facebook app, Twitter etc. Actually posting responsibility is implemented by this native app.
    So, screenshot compression is not MobileSocial plugin issue. It's related to native app you are using for sharing.

    There is NO issue in this case.
    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.
     
  32. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
  33. siddharth3322

    siddharth3322

    Joined:
    Nov 29, 2013
    Posts:
    1,049
    I don't want to wait for new release of facebook app for ios for sharing purpose. So I have decided to go through login in facebook app then allow sharing of text and image.

    I have already implemented this in my game but I have also found one problem in this. If I login through same facebook account in which I have created app then only it allow sharing otherwise it replying like 403: forbidden
    and not allow sharing.

    As per our previous discussion I have to add permission in facebook app then submit it form review to facebook team.
    So here my question is which permission I have to add in my facebook app?

    Do you have any information when facebook releases new version? Because I have uploaded 4 app in iOS market otherwise I have to re upload all of them.
     
  34. CastleIsGreat

    CastleIsGreat

    Joined:
    Nov 10, 2014
    Posts:
    176
    Hi, so far the plug in has seemed pretty impressive, however when building in xCode I get about 23 Mach-O Linker errors. Not sure what this even means honestly, looking into it more now but was wondering if anyone else is having isuses, and these issues are tied directly to implementation of MSP addition.
     
  35. plotlessplot

    plotlessplot

    Joined:
    Sep 16, 2012
    Posts:
    28
    Sorry for the delay! I used the plugin menu to remove the SDK. I'm just sharing to Twitter, so I decided to remove it. I've updated the plugin to 6.5 and will do a new test today.
     
  36. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    Of course you can login info Facebook with your developer account (in which you have created app).
    It's automatically added as tester for your application.

    You have two ways to resolve your problems.
    One is to add new user as tester of your application. This new user will be allowed to login.

    Before you release your application, it has to pass Facebook review.
    After successful review, all users will be able to log in.
     
  37. siddharth3322

    siddharth3322

    Joined:
    Nov 29, 2013
    Posts:
    1,049
    Hi,
    Thanks for your reply. I have submitted facebook app with publish_actions permission added.

    For sharing text, link and image sharing whether I have done correct step?

    I have uploaded ipa file for review process. Will they allow me for this ipa file? Because they have suggested zip file for review.
     
  38. siddharth3322

    siddharth3322

    Joined:
    Nov 29, 2013
    Posts:
    1,049
    Now I got reply from Facebook review team.
    They replied me like this.

    Screen Shot 2015-05-27 at 5.14.53 pm.png

    I have uploaded .ipa file that was my mistake. Review team replied me to upload simulator build but my game is large and I cant able to create simulator build and upload it for review. I am getting lots of errors while generating build for simulator while it works perfect when I go for device build.

    So in this condition what I have to do?
    Please help me. I need your support in this.
     
  39. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    First if all, what issues do you have while building for simulator?
    And I guess you should send similar request to the facebook team as well, since it looks like more Unity + Facebook issues that plugin issue.
    Besides as I sad before plugin has only wrapper for the official FB SDK.
    But I will try to help you as well, and first fo all I need to know why you can not build for simulator.

    Cheers!
     
  40. siddharth3322

    siddharth3322

    Joined:
    Nov 29, 2013
    Posts:
    1,049
    @lacost, Thanks for your reply. I am waiting for this reply form long time.

    I have integrated several extra features other than actual game.
    - Social integration
    - Chartboost Ads
    - Unity Ads

    So when I generate simulator build these things are creating problem for me and xCode showing me lots of errors.
    On other side if I create device build then there is no error in xCode.

    One more point my game is big so it might possible it does not work on simulator.

    What is your suggestion about this?
     
  41. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    I am always suggesting to use only real device for testing.
    I mean no point to use the simulator since we already have Unity Editor which just works :)

    Basically you building on device when you need to test some native feature or you would like to see how your game actually work on the device. I mean I do not see a good use case foe the simulator here.
    Cheers!
     
  42. uniwersytetgier

    uniwersytetgier

    Joined:
    Oct 29, 2014
    Posts:
    26
    Can we post a message on Twitter in landscape mode?
     
  43. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Sure, why not.
     
  44. uniwersytetgier

    uniwersytetgier

    Joined:
    Oct 29, 2014
    Posts:
    26
    Thanks for replay :)
    We implemented your plugin in our newest product. Game work on landscape mode. When we want to share something on iOS, screen go to portrait mode :-(

    On Android devices for fine !
    Do you know why this happens?
     
  45. Rushdi

    Rushdi

    Joined:
    Jul 11, 2015
    Posts:
    2
    Hello,

    I installed the (mobile social plugin) in new empty unity project, on unity Editor it work perfect, but when I build APK for android and try to login, nothing happens.
    Note:- I'm using the (FacebookExample) scene.
    when I was using unity 4.5.3 the plugin work fine on both editor and android, but I upgrade to unity 4.6.7 and install the last (mobile social plugin) version on asset store in new empty unity project.

    any help.
    Thanks in advance.
     
  46. Rushdi

    Rushdi

    Joined:
    Jul 11, 2015
    Posts:
    2
    Hello,

    I figure out the solution, it was my mistack, I need to update the facebook app on my device.
    really sorry guys.
     
  47. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Can you please show me your project orientation settings?
    And also could you show what code do you use to show posting dialog.

    Thx!
     
  48. siddharth3322

    siddharth3322

    Joined:
    Nov 29, 2013
    Posts:
    1,049
    @lacost, I am facing same issue that @uniwersytetgier said.
    For facebook and twitter I am getting same result. My actual game is in landscape mode but sharing dialog shown in portrait mode so no keyboard exist on screen. Here I am attaching screen shot as well code that I used for sharing.

    Share dialog image :

    thumb_IMG_1183_1024.jpg


    Player Setting image :

    Screen Shot 2015-08-12 at 2.20.48 pm.png

    Here is my source code that I used for sharing purpose :

    Code (CSharp):
    1. public void OnFacebookButtonClick ()
    2.     {
    3.         SoundManager.Instance.PlayTapSound ();
    4.         Debug.Log ("share button click");
    5.         StartCoroutine (PostFBScreenshot ());
    6.     }
    7.  
    8.     private IEnumerator PostFBScreenshot ()
    9.     {
    10.        
    11.         yield return new WaitForEndOfFrame ();
    12.         // Create a texture the size of the screen, RGB24 format
    13.         int width = Screen.width;
    14.         int height = Screen.height;
    15.         Texture2D tex = new Texture2D (width, height, TextureFormat.RGB24, false);
    16.         // Read screen contents into the texture
    17.         tex.ReadPixels (new Rect (0, 0, width, height), 0, 0);
    18.         tex.Apply ();
    19.        
    20.         string shareMsg = "I´ve just played #SpreadWarz! Are you played it? \n\n" +
    21.             "http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=1029509558&pageNumber=0&sortOrdering=2&type=Purple+Software&mt=8";
    22.        
    23.         SPShareUtility.FacebookShare (shareMsg, tex);
    24.        
    25.         Destroy (tex);
    26.     }
    Please give some suggestion to come over this.

     
  49. cdutoit

    cdutoit

    Joined:
    Jul 20, 2013
    Posts:
    34
    Hi -

    I'm trying to get a simple Playmaker action working to read a time line but am getting a fail event.

    I've configured my access keys/tokens in the Window->Stans Assets section (and I've tried those credentials in the sample twitter scene which works).

    Onto the playmaker actions:

    I can do a MSP_Twitter Log In action which returns success (I don't think I need it for the time line but just verifying my credentials work)

    Then I try and do a MSP_Twiter Retrive Time Line and that returns a failure. I put a break point in the PlayMaker action and I see the error in the result:



    As you can see, its giving a 401 Authorization Required.

    Can you please provide some pointers of things to check (or a working Twitter Playmaker example)?

    UPDATE/EDIT:

    Partly user error, partly what appears to be a bug.

    1) The Twitter action is expecting the numerical user ID, not the screen name ... my bad.
    2) However, the playmaker action still throughs an error. I had to change this line in the Retrive TimeLine action:

    loadedTweets.value = result.tweets.text;

    to

    loadedTweets = result.tweets.text;

    Thanks
     
    Last edited: Aug 28, 2015
  50. cdutoit

    cdutoit

    Joined:
    Jul 20, 2013
    Posts:
    34
    Hi -

    Everything works great. However, I had provided my Twitter consumer key and secret in the Window -> Stans MSP settings dialog and while testing in the Unity editor it works fine.

    Now I want to read the consumer key and secret from a database (ie. not hardcoded in the settings). The documentation states that I should use the .init(key,secret) method.

    Where should I call this?

    The playmaker login method doesn't accept this method signature.

    I'm at a bit of a loss where I'm supposed to manually authenticate?

    Help!

    Thanks
    Chris