When I am trying to subscribe a page to my facebook application, the application is asking for manage_pages permission. I am sending a post request to /{page-id}/subscribed_apps.
I am looking for a way to subscribe to a page and configure webhook for only public page information without asking for manage_pages permission. Is there any way to do so ?
Thanks in advance!
A Page Access Token is required for all methods.
Since you can only get a Page Token for Pages you manage, there is no way to subscribe a Page to an App without managing it.
Source: https://developers.facebook.com/docs/graph-api/reference/page/subscribed_apps
Related
Can someone explain to me how to get a facebook token to extract posts from public pages? I don't understand how to get it. I use the Graph API and select the user_posts feature.
I believe I then have to submit the app to Facebook, but I need a logo to do that?! Please help!
user_profiles is for User Profiles, not Pages. You need to use manage_pages and a Page Token for Pages you manage, or apply for Page Public Content Access with an App Token for pages you do not manage.
More information about Tokens and how to generate them: https://developers.facebook.com/docs/facebook-login/access-tokens
I am new to business manager as all of the pages I manage I have created myself. I have said I will look after a page for someone and they have granted me access, thus the page appears in my Business manager and I can make changes.
What I need to do is create an App/API connection to link the page to the website, is there anyway to do that without logging in through the customer's personal account or asking the customer to create the app?
The App needs to allow the website to autopost status updates.
Regards
Donna
For posting status updates with the API, you need to do the following:
Authorize someone who can post "as Page" with the manage_pages and publish_pages permission
Get the Page ID with the following API call: /page-id?fields=access_token
Post by using the resulting Page Token with this endpoint: /page-id/feed
...of course you need an App for that.
More information about Tokens:
https://developers.facebook.com/docs/facebook-login/access-tokens
http://www.devils-heaven.com/facebook-access-tokens/
I have a website that query Facebook graphApi and get the available public data of pages.
I have some profiles, where graphApi does not return any data i.e. post/status data marked public on profile.
Even when I try to visit profile manually i.e. by typing url in IE - https://www.facebook.com/ndalloul, it redirects me to Facebook login page.
But when I do it manually i.e. login to my Facebook Account and try to view the profile Ex:https://www.facebook.com/ndalloul shows me the data marked as public.
How to get this data from Facebook using API or Library?
Any help is appreciated.
Thanks.
Apart from the fact that Facebook is switching to the Graph API 2.0, you should not get any kind of redirect to login if you use your app access tokens and talk to the graph via cURL 8ro qeuivalent) .
The endpoint to get public statuses from fan pages, is page_id/feed/ You need an access token from an app with with read_stream permission and only those who grant you that permission will show the latest posts. More info here
You may now have to be approved by facebook to read the stream, by the way.
I'm using a facebook extension in TYPO3 to pull out the facebook posts of a page. Therefor I need the accesstoken.
I googled around and found that I need a facebook app and I need to be administrator of the page.
Then I heard that I need to connet the app with the site, but how can I do this?
I also tried to get accesstoken:
https://graph.facebook.com/oauth/access_token?client_id=APP_ID&client_secret=APP_SECRET&grant_type=client_credentials
And then performing:
https://graph.facebook.com/oauth/access_token?grant_type=fb_exchange_token& client_id={app-id}&client_secret={app-secret}&fb_exchange_token={short-lived-token}
... with this token but it says No user access token specified
Can someone help me step by step how to get the long lived token?
As you just want to pull, you really don't need a page access token. Until and unless you have a demographic or other restriction over your page. All the pages are Public and data over them can be easily accessed by using the App Access Token which is simply put
Your_App_ID|Your_App_Secret
first u need to get an API key from facebook, so here are the steps--->
http://www.shoutmeloud.com/how-to-acquire-your-facebook-api-key.html
& then u can access facebook API, these are docs provided by the facebook to use that API--->
https://developers.facebook.com/docs/guides/web/
This was my implementation (PHP):
$newposts = json_decode(file_get_contents("https://graph.facebook.com/YOURFBPAGE/feed&access_token=YOURAPPID|YOURAPPSECRET"));
Since I was only using this to make simple pull request of my feed posts this is the best way to do it. You don't have to deal with expiring access tokens. Just create your facebook App and get the ID and secret.
I'd like to show my facebook wall posts on my website.
So i don't want to authenticate users with a dialog, to grant them some rights, i just want to show him my wall with comments (no ability to add comment just read only access).
As i know there isn't unexpired tokens now so is it possible to access just my data without requesting token every time it expires?
I'm using asp.net mvc but i think this sultion doesn't depend at platform at all.
You should:
Make your Facebook Posts public
Call the API endpoint: https://graph.facebook.com/{your_id}/feed?access_token={app_access_token} with your user_id and valid application access_token
Show the results on your website.
The App Access Token doesn't expire so you won't have a problem. As long as the posts are public, the API will be able to pick them up. In theory, your posts should be public anyway so anonymous users can see this.
This also gives you the ability to share stuff privately and not have it show up on your website.