Authentication on facebook for graph api - facebook

i need to get my facebook notifications. So i find this: http://developers.facebook.com/tools/explorer/?method=GET&path=me%2Fnotifications
if i understand well i need to get a token and go to https://graph.facebook.com/me/notifications/ to get an array of all my notifications.
But i can't understand how i can get a corrent token.
Someone can help me? :)

You need to authenticate using Facebook Connect first.
This is probably where you should start reading.
http://developers.facebook.com/docs/authentication/

Related

Facebook insights return empty data

I ll try to explain what I want to do step by step.
I have a web page which post some things to facebook using his API. I have the next permissions:
Permission.USER_PHOTOS,
Permission.EMAIL,
Permission.PUBLISH_ACTION,
Permission.READ_INSIGHTS,
Permission.USER_BIRTHDAY,
Permission.USER_POSTS,
Permission.USER_LIKES
The user accepts these permissions at the facebook login. I post some info to facebook, the post is shared successfully, and I get the postID.
Then, I want to get the insights. Before coding, I am testing this on the facebook developer console. Can you please, tell me if I am miss doing something?
I choose the app
When I want to create the token, which is the right option? User Access Token, App Token or Page Token?
I get this result for the user access token
With the apptoken
and the fb_traceid value is this:
And this is not a page, then I can't try with the last option.
Could you tell me what I am doing wrong? Thanks in advance.
Please give a ad account for this as the app give its id for getting the insight

Login to facebook in java code and get token

I'm trying to write a program that can go through my details and other's in facebook. for that I used restfb api for facebook, but up until now I logged in to facebook and got my acces token manually.
Is there a way to do this by code?
I dont know how to send url request if its needed for my request.
Thank you!!
oAuth2 is what you're looking for

Get post from a Facebook Page without login

I am trying to get the post of a Facebook Page throw iOS API and I can't do it without login before (without access token). Is there any kind of solution to make this? Does anyone know it?
The App report me the follow error:
An access token is required to request this resource.
UPDATE
I generate one access token with this structure: APPID|APPSECRET and give it an expiration date. With this, I can access to the public data of my Page :)
Thanks,
David
Graph API Documentation seys:
posts [..] any valid access_token or user access_token
More informations you can find there http://developers.facebook.com/docs/reference/api/page/
Here is live example http://developers.facebook.com/tools/explorer/?method=GET&path=19292868552%2Fposts
+1 well... facebook data is all about "user", therefore you always need valid access_token
there are few exceptions though,
for example, you can display user profile picture without token,
see example;
https://graph.facebook.com/100001789213579/picture?type=large

How to get facebook offline_access token?

How to get offline access token of facebook?
I know that from recently time is out of date. And if I can't get offline access tokens.
What solutions of this problem is?
If you want to get a fresh token, simply follow this guide. You can obtain it through the JavaScript SDK, or doing a request to Oauth. In both cases the user will not notice anything unless he de-authenticated your app.

Get facebook comments with the graph api without user authentication

I'm building a flex application using the http://code.google.com/p/facebook-actionscript-api/ library.
Is it possible to get all the comments for an OBJECT_ID (https://graph.facebook.com/OBJECT_ID/comments) without the current user being logged in facebook. If it is, please tell me what the OBJECT_ID needs to be (post in public group or something else).
Thanks in advance.
blz
You need to request the offline_access permission. It will give you an access token that won't expire. Save it in your database and use it for your connections and it will work without the user.
More: http://developers.facebook.com/docs/authentication/permissions/
I believe Object_ID is the user, and they do not have to be logged in for you to acquire this
But...
What you probably will require is authentication of your request. I believe FB now requires that you register your webapp with them to get the necessary OAUTH signature. I think this is as of F8 2010.