Unity Community

Page 26 of 120 FirstFirst ... 1624252627283676 ... LastLast
Results 501 to 520 of 2383

  1. Posts
    Quote Originally Posted by Prime31 View Post
    @Griffith, are you seeing that behavior with the demo scene? I can't reproduce it on my end.
    Prime. Apologies for making you have to look that up. It seems if I do the request /1/friends/ids.json with no arguments, it will work after a restart or require authentication if there isn't a restart.

    To make this work fine, restart or not, it needs to be supplied with a screen name argument. Thanks for pointing me to the sample though that brought me to the bottom of the issue.

    Good plugin and support

  2. Posts
    Quote Originally Posted by Prime31 View Post
    @petero, you are using an old version of the iOS SDK. You must build against iOS 5.
    Hi Prime31, just update unity3D to 3.4.2 and ios sdk 5. Now there is no such red flag error. N I am trying your demo screen. Hope there is no any problem ... thx
    Unity3D - Mac OS X - iPad - iPhone - iTouch - psi-studio.com

  3. Location
    Ghent, Belgium
    Hi guys,

    I am having a problem with the post-build step that adds the plugin code to the XCode project. We upgraded our dev machine to OSX Lion and XCode 4 a little while back, and now this doesn't seem to be working. Unity tells me Postprocessbuildplayer is being run, but I don't get a notification in Finder and XCode doesn't get the plugin code.

    Does the plugin build process support XCode 4, and if so how can I get this to work? Help would be much appreciated, thanks in advance.

  4. Location
    Southampton, UK
    Hey KDeriemaeker - we upgraded a project with 4 Prime31 plugins from XCode 3 to 4, and they continue to work fine.

    I do remember some sort of hassle with XCode itself when we made the switch, I think I had to manually clear cached data from
    ~/Library/Developer/Xcode/DerivedData to properly build from scratch, but I forget the exact issue...

    Certainly you should delete any existing build folder and rebuild from scratch (and also "clean all targets" within XCode)

    Finally, does Unity have a "Prime31" menu? If so there's a "Plugin troubleshooter" option which will look for some basic common issues.
    For example, I have experienced the issue where the Postprocesbuildplayer scripts do not have execute permissions, and had to manually chmod +x them from terminal...


  5. Location
    Southampton, UK
    Hi Prime31, I have an iPhone 4 and iPad 2, both with iOS 5 (9A334).

    TwitterBinding.isTweetSheetSupported() always returns false on both devices even though TwitterBinding.canUserTweet() is true and I can happily post using TwitterBinding.showTweetComposer ...

    Is there something I'm doing wrong?
    Can I just use ~.canUserTweet() to determine an iOS 5 device with a valid Twitter account already bound to it?

    Many thanks once more!

  6. Posts
    @DarkJedi, that is very, very odd. I believe canUserTweet checks the same stuff as isTweetSheetSupported plus more. I would love to see that behavior in the debugger...if only I could reproduce.

  7. Location

    custom graph request returns empty string...

    Hey Prime,

    I've integrated the SocialNetworking plugin, and verified that my user is logged in to facebook before retrieving their friends. I want to display the user's friends in a UI view along with their profile pictures. Here's the relevant code below:

    1.     void facebookReceivedFriends( ArrayList result )
    2.     {
    3.         Debug.Log( "received total friends: " + result.Count );
    4.         for(int i = 0; i < result.Count; i++)
    5.         {
    6.             Hashtable ht = (Hashtable)result[i];
    7.             foreach(DictionaryEntry d in ht)
    8.             {
    9.                 string userID = ht["id"].ToString();
    10.                 string userName = ht["name"].ToString();
    12.                 Debug.Log(userID + "," + userName);
    14.                 FacebookBinding.graphRequest(userID + "/picture", "GET", new Hashtable());
    15.             }
    16.         }
    17.     }

    I can confirm that

    a) userID has the friend's userID
    b) userName is accurate

    My problem is that the callback to facebookDidRecieveCustomRequest(string result) returns an empty string!

    1.     public void facebookDidReceiveCustomRequest( string result )
    2.     {
    3.         Debug.Log(result);
    4.         if( facebookReceivedCustomRequest != null )
    5.         {
    6.             object obj = MiniJSON.jsonDecode( result );
    7.             facebookReceivedCustomRequest( obj );
    8.         }
    9.     }

    so, in the above example, result is NOT null but appears to be ""... This will create an object from an empty string which I believe makes the object null. I'm actually seeing a NullReferenceException when I try to access obj from within facebookRecievedCustomRequest(object obj).

    So I guess my question is if I'm formatting my graph request properly, because that is likely the source of the issue since others are successfully using the plugin

    Thanks for the help!

  8. Posts
    @NT7, your request looks fine but your event handler is the issue. The custom request returns an object, not a string. The object will be either an ArrayList or a Hashtable. You can check by just doing something like the following:

    var ht = result as Hashtable;
    If( ht != null )
    Use the ht

    var list = result as ArrayList;
    if( list != null )
    Use the list

  9. Location
    OK, assuming my request is well-formatted, then there is something else going on. In the following function:

    1. public void facebookDidReceiveCustomRequest( string result )
    2. {
    3.     Debug.Log("recievedCustomRequest and it looks like: " + result + "!!!");
    4.     if( facebookReceivedCustomRequest != null )
    5.     {
    6.         object obj = MiniJSON.jsonDecode( result );
    7.         facebookReceivedCustomRequest( obj );
    8.     }
    9. }

    result is "" (an empty string). When this empty string gets put into obj from MiniJSON.jsonDecode(result), it is null. Therefore, when obj is passed to facebookRecievedCustomRequest, it is null and there is no data to work with:

    1. void facebookReceivedCustomRequest( object obj )
    2. {
    3.     Hashtable ht = obj as Hashtable;
    4.     ArrayList al = obj as ArrayList;
    6.     if( ht != null )
    7.     {
    8.         Debug.Log("It's a Hashtable");
    9.     }
    10.     else if( al != null )
    11.     {
    12.         Debug.Log("It's an ArrayList");
    13.     }
    14.     else if (obj == null)
    15.     {
    16.         Debug.Log("It's null");
    17.     }
    18.     else
    19.     {
    20.         Debug.Log(obj.GetType().ToString());
    21.     }
    22. }

    I will try other graph requests to see if I can get actual data back at all, as well. Any help is appreciated in the meantime!

    UPDATE 1: FacebookBinding.graphRequest("me","GET",new Hashtable()); returns exactly what I expect it to, so maybe it is in fact my request?
    Last edited by NT7Games; 11-10-2011 at 01:31 PM.

  10. Posts
    @NT7Games, setting up a result handler like the demos scene does (see below) is a great way to debug what Facebook is sending you. The ResultLogger class will let you debug the returned object by printing it all to the console.

    1. // Sample of how to get the results of a custom facebook graph request
    2. SocialNetworkingManager.facebookReceivedCustomRequest += delegate( object result )
    3. {
    4.     ResultLogger.logObject( result );
    5. };

  11. Posts
    Im trying to make use of a custom graphAPI call using the facebook social networking plugin but I am getting back unexpected and confusing data. Here's what's going on.

    1. {
    2.   FacebookBinding.init("My App ID");
    3.   SocialNetworkingManager.facebookLogin += OnFacebookConnect;
    4.   FacebookBinding.login();
    5. }
    7. public void OnFacebookConnect()
    8. {
    9.   SocialNetworkingManager.facebookLogin -= OnFacebookConnect;
    11.   SocialNetworkingManager.facebookReceivedCustomRequest += OnFriendsLoad;
    13.   FacebookBinding.graphRequest( "me/friends?fields=installed,first_name,last_name,picture", "GET", new Hashtable() );
    14. }
    16. public void OnFriendsLoad(object result)
    17. {
    18.   SocialNetworkingManager.facebookReceivedCustomRequest -= OnFriendsLoad;
    19.   Debug.Log("OnFriendsLoad REACHED...  result below");
    20.   ResultLogger.logObject(result);
    21. }

    The result object that is logged is what I would get if I used just "me" as the graph api call. That is not what I expect to receive. Even here: https://developers.facebook.com/tools/explorer when I use:


    I get a list of my friends, not my own user information.

    Am I doing something wrong? How do I get the results I want?


    P.S. I'm using the latest version of the plugin (released 11/7), I'm not receiving any other errors amidst the output I am generating in the console output of xcode while running on a connected iPad.

  12. Posts
    @pagoli, I believe I responded to you via email already. Check your email.

  13. Posts
    Anyone else still seeing the "An error occurred with <game>. Please try again later." when trying to post to facebook? It seems to be some facebook error.

  14. Posts
    Doh, I forgot that I had changed my game to use showPostMessageDialogWithOptions, and was passing in the path to an image on the device, rather than a url, which fails (with a not very useful error). When I removed that it worked. I also discovered that you can no longer pre-fill the dialog with a message (as of July 12 according to https://developers.facebook.com/docs.../dialogs/feed/).

  15. Posts
    Hello, this social networking plugin has been working great, except recently for trying to post tweets - the first time I posted a tweet via this plugin in a new app it worked, but all subsequent calls have failed to post a tweet. Then going back to a previous app (that used a version of this plugin from before the last couple of updates), I found that one no longer posts tweets too. Is this a known issue?

  16. Posts
    @Ben, what error are you getting in the twitterPostFailed event? Are you by any chance trying to send the same tweet multiple times (Twitter will only let the first one go through).

  17. Posts
    Aha! The error it returns is: Twitter post failed: Could not authenticate with OAuth.
    So the authentication is failing except for the first time? I have been using showOauthLoginDialog() for logging in to twitter each time.
    The tweets are definitely different each time.

  18. Posts
    @Ben, so, you are logging in then posting a message and getting a "Could not authenticate with OAuth" error immediately? That seems quite odd. The OAuth token received from logging in should get you access to the Twitter API. What do you get returned when calling isLoggedIn? Are you sure you arent calling logout (which invalidates the access token) at some point?

  19. Posts
    I find twitter to be a bit hit and miss. It works for one of my testers but only rarely for me :/

  20. Posts
    @sam, what error are you seeing? I haven't seen any issues recently with Twitter.

Page 26 of 120 FirstFirst ... 1624252627283676 ... LastLast

Posting Permissions

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