Unity Community


Page 53 of 119 FirstFirst ... 343515253545563103 ... LastLast
Results 1,041 to 1,060 of 2379

  1. Posts
    10
    Just downloaded and installed the latest SocialNetworking_2012-06-12 package. Still experience the issue. Tapping "Cancel, and return to app" link results in just opening my Twitter app callback URL in this window instead of closing it and return to app.


  2. Posts
    6,307
    @basurman, did you delete the old files before reimporting? We cannot reproduce when importing into a fresh project.


  3. Posts
    25
    I have a problem with posting a score to facebook.

    giving me this problem;

    InvalidCastException: Cannot cast from source type to destination type.
    at Facebook+<postScore>c__AnonStorey9.<>m__2 (System.String error, System.Object obj) [0x00000] in <filename unknown>:0
    at Prime31.P31RestKit.processResponse (UnityEngine.WWW www, System.Action`2 onComplete) [0x00000] in <filename unknown>:0
    at Prime31.P31RestKit+<send>c__Iterator0.MoveNext () [0x00000] in <filename unknown>:0

    (Filename: Line: -1)

    Is there a way how I can figure out whats going on in this dll file?

    I'm able to login, fetch my id, I receive an app id and can receive my friends ids.


  4. Posts
    6,307
    @beeky, what are you passing the method? Is your app properly setup on Facebook as a game? Have you tried the demo scene which has a working version of posting scores? Invalid cast exceptions are almost always due to passing invalid types.


  5. Posts
    25
    I'm passing my facebook id and score,

    I have this exception on line 209 in Facebook.cs:
    var result = (bool)obj;
    completionHandler( result );

    I have the same issue with the example.
    'Get Scores' is working, post score not at the moment.

    app access token retrieved: 411318234448906292|etnSTUAoF9BDt3YTVJf25inOmwM
    UnityEngine.Debug:Internal_Log(Int32, String, Object)
    UnityEngine.Debug:Log(Object)
    SocialNetworkingGUIManagerTwo:<OnGUI>m__7(String) (at /Users/s/FF/src/Assets/Plugins/SocialNetworking/testSupportIOS/SocialNetworkingGUIManagerTwo.cs:134)
    <getAppAccessToken>c__AnonStorey8:<>m__1(String, Object) (at /Users/s/FF/src/Assets/Plugins/SocialNetworking/FacebookCommon/Facebook.cs:170)
    Prime31.P31RestKitrocessResponse(WWW, Action`2)
    Prime31.<send>c__Iterator0:MoveNext()

    (Filename: /Users/s/FF/src/Assets/Plugins/SocialNetworking/testSupportIOS/SocialNetworkingGUIManagerTwo.cs Line: 134)

    InvalidCastException: Cannot cast from source type to destination type.
    at Facebook+<postScore>c__AnonStorey9.<>m__2 (System.String error, System.Object obj) [0x00006] in /Users/s/FF/src/Assets/Plugins/SocialNetworking/FacebookCommon/Facebook.cs:209
    at Prime31.P31RestKit.processResponse (UnityEngine.WWW www, System.Action`2 onComplete) [0x00000] in <filename unknown>:0
    at Prime31.P31RestKit+<send>c__Iterator0.MoveNext () [0x00000] in <filename unknown>:0

    (Filename: /Users/s/FF/src/Assets/Plugins/SocialNetworking/FacebookCommon/Facebook.cs Line: 209)


  6. Posts
    6,307
    @beeky, you didn't anser all the questions I asked. Is you app properly setup on Facebook as a game? You can turn on debugging by setting the "debugRequests" to true in the Facebook class. Are you requesting the appropriate permissions as well to be able to post scores on behalf of a user?


  7. Posts
    25
    After some debugging and testing I found my problem.
    Facebook was returning an error message what gave the cast exception.
    last week I filled in some permissions and the auth token parameter option was set to query string by default.
    by turning of this Authenticated Referrals setting in Auth dialog on the Facebook developer page the warning left;


  8. Posts
    10
    Quote Originally Posted by Prime31 View Post
    @basurman, did you delete the old files before reimporting? We cannot reproduce when importing into a fresh project.
    Completely removed the old files and installed the latest version. Unfortunately it didn't help. I suspect that may be something wrong in my Twitter app settings but can't even guess what could it be.

    Any ideas?


  9. Posts
    10
    To localize the problem I created an empty Unity project and imported only latest Social Networking package (SocialNetworking_2012-06-12.unitypackage) to it. Then I added my test Twitter app consumer key and secret to TwitterBinding.init function in SocialNetworkingGUIManager. Then, I run your SocialNetworkingtestScene on iPad, tap "Initialize", then "Login with Oauth", the Twitter login dialog opens. Then I tap "Cancel, and return to app" link and observe the problem I described above (my app callback URL is loaded in dialog above my app, instead of closing this dialog and returning to app).

    Can you please have a look at this simple test project and tell me what I'm doing wrong?

    EDIT - PLEASE DON"T POST LINKS TO PROJECTS THAT CONTAIN SOURCE CODE TO COMMERCIAL PRODUCTS.

    Thanks in advance.
    Last edited by dendrophile; 06-20-2012 at 11:25 AM. Reason: remove link


  10. Posts
    6,307
    @basurman, your Twitter app setup shouldnt affect that. We cannot reproduce what you are seeing. In addition, please remove the download immediately. Our EULA strictly forbids distribution of the source code of our plugins.


  11. Posts
    139
    Hey all, I did a small video on how I integrated the prime31 social networking plugin in to our iphone game project.
    It uses an older version of the plug-in but I believe it's still quite similar to the newer plug-in.

    I hope this is useful anyway. It's not the only way to do it, but just how I added it to the game

    Awesome plug-ins prime, keep up the great work

    Martin

    Free iphone game - www.tinyurl.com/gochickgofree
    Fly high, be the best, top your score, brag to your friends!
    More updates for Go Chick Go coming soon.


  12. Posts
    6,307
    @macfinch, well done Martin! A great resource for everyone and we get to see little you in the corner the whole time


  13. Posts
    139
    Quote Originally Posted by Prime31 View Post
    @macfinch, well done Martin! A great resource for everyone and we get to see little you in the corner the whole time
    Free iphone game - www.tinyurl.com/gochickgofree
    Fly high, be the best, top your score, brag to your friends!
    More updates for Go Chick Go coming soon.


  14. Posts
    10
    Quote Originally Posted by Prime31 View Post
    @basurman, your Twitter app setup shouldnt affect that. We cannot reproduce what you are seeing. In addition, please remove the download immediately. Our EULA strictly forbids distribution of the source code of our plugins.
    Everything is removed, sorry, I didn't want to violate your EULA. I'll continue to deal with this issue and hope will find a solution. Thanks for your help and advices.


  15. Location
    Spain - Ciudad Real
    Posts
    6
    Hi, I'm using this code:
    Code:  
    1. void Start () {
    2.         FacebookManager.customRequestReceivedEvent += result =>
    3.         {
    4.             ResultLogger.logObject( result );
    5.         };
    6.     }
    7.    
    8.     void completionHandler( string error, object result )
    9.     {
    10.         if( error != null )
    11.             Debug.LogError( error );
    12.         else
    13.             ResultLogger.logObject( result );
    14.     }
    15.    
    16.     private void shareFacebook()
    17.     {
    18.         FacebookBinding.init( "xxx" );
    19.        
    20.         if(!FacebookBinding.isSessionValid())
    21.         {
    22.             FacebookBinding.loginWithRequestedPermissions( new string[] { "publish_actions", "user_games_activity" } );
    23.         }   
    24.         postMessage();
    25.     }
    26.    
    27.     private void postMessage()
    28.     {
    29.         Facebook.instance.postMessage( "Distance: " + distance, completionHandler );
    30.     }

    When I'm testing my share botton in the iPhone, when I allow the facebook application and back to the game, in Xcode I receive a EXC_BAD_EXCEPTION in Facebook.instance.postMessage().

    My Facebook app is configured as a "Native iOS App" in Games category.

    What I'm doing bad?


  16. Posts
    6,307
    @zeroz, your code is calling postMessage before login completes. You have to be logged in before you can post a message.


  17. Location
    Spain - Ciudad Real
    Posts
    6
    @prime31 when you know if login is complete?


  18. Posts
    6,307
    @zeroz, directly from the docs:

    // Fired after a successful login attempt was made
    public static event Action loginSucceededEvent;

    // Fired when an error occurs while logging in
    public static event Action<string> loginFailedEvent;


  19. Location
    Spain - Ciudad Real
    Posts
    6
    I have added this and I don't know if is correct because I get errors in the same instruction (Facebook.instance.postMessage):

    Code:  
    1. private void shareFacebook()
    2.     {
    3.         FacebookBinding.init( "xxx" );
    4.        
    5.         if(!FacebookBinding.isSessionValid())
    6.         {
    7.             FacebookManager.loginSucceededEvent += OnFacebookLogin;
    8.             FacebookBinding.loginWithRequestedPermissions( new string[] { "publish_actions", "user_games_activity" } );
    9.         }   
    10.         else
    11.             postMessage();
    12.     }
    13.    
    14.     void OnFacebookLogin()
    15.         {
    16.                postMessage();
    17.         }
    18.  
    19.    
    20.     private void postMessage()
    21.     {
    22.         Facebook.instance.postMessage( "Distance: " + distance, completionHandler );
    23.     }


  20. Posts
    6,307
    @zeroz, that looks about right to me though you may want to make sure you are requesting the proper permissions for posting on a users wall without a dialog.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •