Yeah, you don't have to set up anything on graph. Score exists automatically if it's a "game" type. I don't see scores on my Facebook either, I'm not sure how to get those to show up there. But I do have scores when I query the graph API for scores of my app. Have you tried that?
Anyone know how to get the scores to actually show up on Facebook?
Brian Hunsaker, Technical Director
Dark Tonic Games Studio
Unity plugins with uncompromising quality and ease of use:
Master Audio - The ultimate audio config tool
Killer Waves - The ultimate level/wave spawning and setup tool
Highly polished, crazy fun games:
Wall Street Titan on iOS
Indie Game Magazine Best of 2012. Coming soon to Android.
When I testing it with the demo scene from prime I can submit score but it doest show up on facebook and when I press getscore I see the correct score in xcode console showup so thats working.
I only want users to post there highscore on there facebook account for other people to see.
Posting from unity to facebook was easy. but now the scores.
I'm trying to use the facebook plugin on iOS. But I can't post a screenshot. I use postimage, but I don't get the image or it doesn't post the image. Even in the example scene.
Last edited by EricD; 04-18-2012 at 03:11 AM.
I'm currently using FacebookBinding.showDialog and FacebookBinding.showPostMessageDialogWithOptions to popup a dialog after certain events. At both actions I enter the 'name' property to represent the attached link.
The name property is visible at my Facebook Wall as link title, but it isn't visible at the dialog popup within the app. The only things visible within the popup which are adjustable are the 'caption', 'description' and 'image' fields. Is there any possibility to display the name within the dialog popup?
Last edited by L1F3Stream; 04-18-2012 at 04:20 AM.
@ericd, what error are you seeing returned when you call the method to post the image?
@l1f3, the dialogs run off of Facebooks servers and are not customizable.
Before the latest update, I could get a friend list and ask for additional fields. Is that not possible anymore?
- Facebook.instance.graphRequest("me/friends?fields=id,name,birthday", HTTPVerb.GET, ReceiveFriendBirthdays);
error: message: An active access token must be used to query information about the current user.
But this works:
- Facebook.instance.graphRequest("me/friends", HTTPVerb.GET, ReceiveFriendBirthdays);
In the previous version, something like this worked:
- FacebookBinding.graphRequest("/me/friends?fields=id,name,birthday", "GET", Hash);
Any ideas? It was nice being able to get friends and additional info in one request.. I'd rather not go through every friend to find their birthday with a separate request. Those fields still work if I use the fb graph api explorer https://developers.facebook.com/tools/explorer
edit: I tried using my own user id instead of 'me' and got interesting results. It works fine on the graph api explorer, but I get an error like this if I do it in the app:
error: message: (#100) Unknown fields: birthday?access_token=[myaccesstoken]
@Jtown, you should be able to pass in the "fields" parameter with the value "id,name,birthday" as a standard parameter of type Dictionary<string, object> to the "me/friends" path. Give that a go and see if it does the trick.
Worked like a charm. Thanks!
edit: I love the new completion handlers, btw
edit2: This has nothing to do with the plugin, but I thought it was interesting: I noticed for one of my friends, the graph request doesn't get a birthday for her -- but if I go to her page normally, her full birthday is right there, so it's not like she doesn't have it shared.
I really wish it was documented that using postscore does not actually post them on Facebook. Very disappointed because I thought I was doing something wrong.
I tried various methods, but looks like mobile iOS apps that call post score are not posted on Facebook. Posting to walls is simple enough. Hopefully it is something Facebook is working on and have plans to amend.
@JTown, I believe there is a permission required to get a users birthday.
I am about to buy and integrate this plugin to my next game. Just wanted to say thanks for making it - it looks great
I makes games with Unity3D as co-owner of NeonBlue and I make business apps as a senior developer at NEC IT Australia. I also have a dev blog.
So just have a minor issue. I have Facebook and Twitter working well for iOS. I also have Facebook working well with Android.
Need help with the Twitter side of things. So far I have the Twitter logging working successfully, as well as posts, but it's not firing the even which I assume is mean for posts:
- // Fired when a request succeeds. The returned object will be either an ArrayList or a Hashtable depending on the request
- public static event Action<object> requestSucceededEvent;
- // Fired when a request fails with the error message
- public static event Action<string> requestFailedEvent;
These events are not firing, but tweets are being posted successfully. Here is my bit of code:
- TwitterAndroidManager.requestFailedEvent -= T_Postfailed;
- TwitterAndroidManager.requestSucceededEvent -= T_PostAndroid;
Else in the same script:
Anything I'm missing or using incorrectly? Again it is posting on twitter but just not firing this event.
@priznut, the requestSucceeded/Failed event are for the performRequest method. The twitterPostFailed/Succeeded events are for a standard status update post. You can always stick the *EventListener prefab in your scene and watch the logs. It will dump every event to the console and can be quite informative.
Thanks again for all the help and I got another question.
My user posts are appearing into their feeds just like expected, however they always come in as private.
Do I have to use the FacebookAndroid.showPostMessageDialogWithOptions functionality or should I move away and do my own POST requests to their feeds?
I was having issues with the friends request dialog as well in the past, have tried to re-create my account and re-wire everything and still having issues. I'm not sure if you had any leads back from FB but it's a bit disheartening to potentially see users posting to their feeds without it being an effect method of sharing with their friends. I've tried several times uninstalling the app from the accounts and doing all sorts of things to make sure that posts and requests seem to be coming in properly.
If you received any useful information back from them, please let me know. I'm still in a bit of limbo with why these posts are behaving in this manner.
@iretro, you will need to consult Facebooks docs to get information that detailed. Their system is absolutely massive so we do not know every minute detail with regard to their permission system
I'm trying to port the functionality of my app over Android version and I faced some issues - when trying to call a simple Graph request I get an error "java.io.FileNotFoundException: https://graph.facebook.com/me?fields=id%2cname"
Handler:Dictionary<string, object> parameters = new Dictionary<string, object>();
Facebook.instance.graphRequest("me", Prime31.HTTPVerb.GET, parameters, userDataRequestReceivedEvent);
Parameter "key" returns the above error and the parameter "value" is null. Oh, and even the simpler call with path "me" but without any fields returns the same error.void userDataRequestReceived(string key, object value)
Where can be the problem? Please help!
@loook, I believe you have something else going on there. Unitys WWW class appears to be interpreting the Graph URL as a file. Do you have the force Internet permission set?
@Prime: Yes, I switched the Internet Access option in Unity Player settings from Auto to Require but this didn't change anything.. And I do have active wi-fi connection while testing.