Authenticating as an App for facebook request

Hi struggling to work out how to do this with the facebook api:

https://developers.facebook.com/docs/authentication/applications/

Is it possible? I can authenticate as user no problem. I would like to be able to post scores which needs the app access token as well as user token.

It involves a request with the application secret.

Thx [import]uid: 118379 topic_id: 26268 reply_id: 326268[/import]

Yes its pretty easy. You will need to go to http://developers.facebook.com/ and setup a facebook app to get your secret etc.
[import]uid: 9840 topic_id: 26268 reply_id: 106455[/import]

This is the api you’ll want to read up on:

http://developer.anscamobile.com/reference/index/facebookrequest [import]uid: 9840 topic_id: 26268 reply_id: 106457[/import]

Yes I can get that far, what I need requires a further token, the “app access_token”. The token your talking about is the user access token.

I linked it above.

So my request needs to be like the following

facebook.request( “me/scores”, “POST”, {score=10,access_token=appToken} )

I think I managed to get it last night by changing the login string query but then lost the user token during the process of changing. For it work I need both.

Essentially it allows the use of the Open Graph API to create user stories, create and compare scores furthing the viralness.

The app token gives access to these facilities.

Thanks.
[import]uid: 118379 topic_id: 26268 reply_id: 106495[/import]

This is where the application secret string comes into place too. [import]uid: 118379 topic_id: 26268 reply_id: 106500[/import]

https://developers.facebook.com/docs/opengraph/using-app-tokens/

Ok sussed, the App Token is a security risk. If a user hacks your device they could get the token and make up scores and achievements hence why its not in the api.

To do it right you need a middle man server with a script that passes on the app requests on behalf of a user. This way the app token is secret.

Im going to bypass this till later, I dont like the sound of having to broker requests. I have a vision of my poor server falling on its head. :slight_smile:

Thanks for help any how. [import]uid: 118379 topic_id: 26268 reply_id: 106502[/import]

@Beloudest, thank you for sharing your finding.

Naomi [import]uid: 67217 topic_id: 26268 reply_id: 106574[/import]