How to Use Scope in Facebook Graph API C# sdk - facebook-graph-api

Before asking this question, I have searched a lot, but did not find a single working example for this. I want to retrieve the page access token for one of my pages. I read that scope should be passed as parameter with permission manage_pages. But its not working.
Here is my code: http://pastebin.com/GNVimbFX

Basically there's two steps that you need to do
Retrieve access_token with manage_pages permission
Get /me/accounts which would return you page access_token
You can read more here

Related

Is it possible to get comments from facebook on a topic through graph api

i want to get comments and sub comments from facebook is it possible through their api or are there any alternatives from where i can do it .
I want the comment , date and if possible location of the user
You cannot get a user's location, but you can get the comment and date/time.
Docs can be found here https://developers.facebook.com/docs/graph-api/reference/v3.3/comment
Access would either require manage_pages and a page token valid for the respective page or Page Public Content Access feature approved.

Error in Search for posts using Facebook Graph API

I am new to this Facebook Graph API.
I want to search for Facebook posts.
https://graph.facebook.com/search?q=query&type=post
On the internet I have found the above request and said that it would give me what I want. But when I tried that it asks for the access token. I don't know where to add it.
Please help me. Thank you.
You canĀ“t search for posts anymore, Public Post Search is deprecated. You can only search for the types specified in the docs: https://developers.facebook.com/docs/graph-api/using-graph-api/v2.4#search
That being said, you need to create an App to get an Access Token and there are different ones. Please read the docs to find out how to get the different Access Tokens, here are some links for you:
https://developers.facebook.com/docs/facebook-login/access-tokens
http://www.devils-heaven.com/facebook-access-tokens/

How can i get all feeds from my profile using facebook graph api?

I am getting only limitted number of feeds i.e**(25 feeds**) from my facebook grapg api and is their any option to get more feeds and i mentioned limit=200 in my URL but i am getting only 25.URL is https://graph.facebook.com/v2.2/me/posts?access_token={access_token}&limit=200.Is their any way to get this please suggest me
First get an access token, then retrieve all your feed. Please note that you may need to reiterate the request as the returned content is paginated (that is, ['paging']['next'] element exists inside the answer).
See also the official documentation.

How do I obtain the requires access token?

Until a few days ago the Python script I was using to generate an RSS feed for my own Facebook News Feed was working fine. The script I was using first signed on to Facebook using my log in information and then called up this page and parsed it for an access token:
http://developers.facebook.com/docs/reference/api
I'm not sure that is exactly the way Facebook wants people to get an access token, but reading through all the information on Graph API I can't seem to find anything that says, "Here's how you get that token you need to access your own stuff." It all seems to be directed at people trying to do far fancier stuff.
How do I obtain an access token such that the page referenced here will return the JSON format data I need?
res = browser.open('https://graph.facebook.com/me/home?access_token=%s' % acct)
Start by reading about Access Tokens as there are different types.
Then, to read the user news feed (home connection), you need a user access_token
To retrieve one using the server-side method, you need to follow this document
To understand the flow of the server-side method you can refer to this diagram (source: Login Architecture document ):

facebook graph api: how to use me correctly?

i am trying to use /me/likes/pageID the same way i used pages.isFan (REST API).
But it always uses the user/page as me for which i created the access token and not the current active user.
can't get my head around this one, any help is appreciated!
thanks
[from comments] but do i really need to create an application to "just" check if the user is fan of my own page? and even ask his authorization?
Yes, you will need an app in any case.
If you run your app as a canvas or page tab app inside of Facebook, then you get the info if the current user liked the very Facebook fan page the app is running in(!) directly from the signed_request parameter.
If you want to query this infor for other pages, and/or your app is running outside of Facebook, then you have to have the user connect to your app and ask permission to read his likes first, before you can get this info.
For information on the latter case, see https://developers.facebook.com/docs/authentication/, https://developers.facebook.com/docs/authentication/permissions/#user_friends_perms, https://developers.facebook.com/docs/reference/api/user/#likes
It is easy: With the new Graph API, the owner of the access token is me. You can see this by pasting an access token into the debugger.
You should be authenticating your user and gaining an access token in their name each time they visit your site. Then use only this access token when you make your query.
This process is easiest if you use one of the Facebook SDKs.