Am quite new to php, facebook graph and stackoverflow so please forgive. Previously, the following in my php script worked to get an access token for a facebook group:
graph.facebook.com/oauth/access_token?client_id={$appId}&client_secret={$appSecret}&grant_type=client_credentials
What should the request be now? (I know my app-scoped user-id if that helps?)
Background: It's a simple server-to-server app to copy photos from a facebook group to a website. Therefore logins don't apply. It's been reviewed and my business verified (that was fun... not!). I've added my app to the group's settings, but can't find the next step. Any help appreciated, thanks.
Related
My name is Alaa and i am the IT manager of my company,
We used our facebook app and the facebook PHP SDK to share our articles automatically from the backEnd of our website to our facebook pages.
so we use the facebook graph API to retrieve the Access Token of our pages and use it in the php script.
But from February 13th, the script is not working anymore. I don't know what to do exactly, but looking on the internet, I found that we must use a new API (Marketing API) because we migrate our facebook account from default to business and we must have permissions (publish_pages, manage_pages), i want to inform you that we used the app several years without need to these permissions.
I want to add also that I can't show my business pages anymore in the list of all pages i manage (Personal and Business).
for example when i use facebook graph API to get access token of a page, i can just see my personal pages and not business pages of my company. i hope that you can anyone explain to me why?
I explain all of that on a video please click here to see it : https://www.youtube.com/watch?v=zhDerUakiNk
Thank you very much for your help.
Have you tried restarting your server? That's what fixed it for me.
Please could you help. I have created a website that allows people to upload listings of items they are selling. I want to know how to add the feature where when someone creates a listing, it automatically posts on the user's FB page, with a link to the listing on our website. Is this possible? Would the user have to log into our website using their FB account for this to happen? Thanks everyone for your help.
Martin
You need to create a Facebook App and use Facebook Graph API with publish_actions permissions to do that. Note that the facebook rules prohibit sending fully automated messages that the user has no control, your user must have the ability to edit the message before sending
I need to display the "wall posts" from Facebook page to another website's social media wall.
The problem is that I never used neither Facebook nor any other social networks and got no clues on how do they work. That's why I'm pretty confused with API and it's terms.
The API docs say that I need a pageId for the page I'd like to display and appId and appSecret to get an access token to the feed.
I understand how to get the token and how to parse the results - but what kind of Application do I need for that? Should I create a facebook profile and make an application that would generate me these app codes? Or ask a page's owner to do it?
I spent quite a time googling but it must be something too obvious to write about it in docs? Help please?
The administrator of the facebook page is the only one that has access to the posts on the page wall.
For the APP:
The application can be created in any facebook verified account - go to: https://developers.facebook.com/apps and create the new app - this will give you the app id and secret.
Use the Facebook SDK that you feel most comfortable with to develop the app.
For the wall posts: There are several Graph API requests for wall posts in the form of:
https://graph.facebook.com/[pageid]/[call] where [call] can be posts, statuses, feed, home. See http://facebook.stackoverflow.com/questions/6214535/what-is-the-difference-between-feed-posts-and-statuses-in-facebook-graph-api for details about each.
Using an access token (that you said you already know how to get) the administrator of the page will be able to call the above URLs and get the wall posts.
For the part with posting the info on another social media website you have to specify the exact environment where you want the wall posts to end up.
I created a little Facebook app that posts to people's walls when they have a birthday coming up. This is all good, but there's a concept I'm not quite understanding.
I'm using a cron job to run a script that searches through users and posts to the ones that have birthdays on that day. I've created a Facebook account for the app so the post should be under the apps account. What I'm confused on is how is the script going to know to post from the app's Facebook account? Do I need to log in through the script somehow? If so, how do I go about doing that?
You are very close to the answer! Yes - you are correct, the application needs to use a certain access_token to performa actions "on-behalf" of the application.
You should read the Facebook Authentication Documentation under the header - "App Login" to learn how to obtain the app access token. After you have this token the methods you use to publish post are identical to regular posts.
I'am really new to all this Facebook development, and I wanted to integrate Facebook within my personal website.
I am now trying to test if what I want is possible.
I want to post a status from my server, via php/js to my Page in Facebook.
How can I do so?
B.W.
I saw that there is this FBJS function called "Facebook.streamPublish"
But I don't know how to integrate it.
Is there any possible way to do so?
Can you give me an example?
-Secondly, what is an access token?
You get an access_token after facebook authenticates you. You will need this access_token for all subsequent API calls. You can find the details here:
http://developers.facebook.com/docs/authentication/
You can use graph API for publishing on the wall and doing other allowed actions. Details of publishing api can be found here:
http://developers.facebook.com/docs/reference/api/post/
But do have a look on the facebook policy, because publishing automatically to a wall is considered violation.
http://developers.facebook.com/policy/