Facebook API: Authorizing App to post on a second Fan Page - facebook

Over PHP we're posting already on a wall of a fan page. Now I created another fan page and I want the same app to post on this wall as well. However, it gives me the same error all the time:
'FacebookRestClientException' with message 'The user hasn't authorized the application to perform this action'
The script perfectly posts with the same app on the old page.
I've used already all the links I could find to give permissions to the app for posting on the page's wall. I even got a "Success" but the PHP script answers still with the same error. I know that FB changes the links sometimes.
Apparently they're trying to make it harder and harder, so maybe someone knows links that work giving the right permissions!?
I've already used the links stated here:
facebook c# sdk - The user hasn't authorized the application to perform this action
Authorizing a Facebook Fan Page for Status Updates
Thank you!!!

The following link did the job:
www.facebook.com/login.php?api_key=YOURAPIID&next=http://www.facebook.com/connect/login_success.html&req_perms=read_stream,publish_stream,manage_pages,offline_access
The key was probably the permission to manage_pages because it then asks you again to give the permission for all the pages you currently have.
Good luck everyone!

Related

Graph API 'likes', publish_stream permission, app unapproved

I have a website that does the following:
Retrieve Facebook Page posts from a specific Page.
Display posts on website.
If a visitor is not logged in to Facebook, display a custom 'log in with Facebook' button next to each post. Otherwise display a custom 'thumbs up' button.
By clicking the 'thumbs up' button, the user is able to like the specific Facebook page post with their own Facebook account. Nothing should show on the user's timeline other than the regular posts that Facebook displays whenever a user likes something on Facebook.
I'm using the Graph API likes method (https://developers.facebook.com/docs/graph-api/reference/v2.2/object/likes/) which requires the publish_actions permission.
Everything is working great, users are able to like posts on the Facebook page from the website, and the action shows up in their Activity Log.
The problem is the app is rejected for the following reasons:
Notes from our review team (Web)
The expected story doesn't publish back to Facebook. I've tried with different test users to reproduce the publish_actions, but nothing is publishing. Please check links and resubmit. Also provide a timeline screenshot of the publish story. Thank you.
publish_actions (Web)
We could not reproduce the requested permission. Please submit a timeline screenshot of a successful publish on Facebook, as well as detailed, step-by-step English instructions in the "Add Notes" section of the permission.
See here for additional information on login permission requirements.
I've provided step by step instructions, screenshots of the website as well as a screenshot of the user's Activity Log that shows them liking the post. Still no luck.
I think the problem may be that they are expecting some sort of story to be displayed on the user's timeline, which I don't need or want. I just want to let the user like the post from a Facebook page which DOES work and confirmed by everyone who's tested it on my end.
If anyone can point me in the right direction (I'm unable to provide screenshots or code here, sorry), it would be greatly appreciated. Thanks in advance!

Post as page Facebook graph api

It is maybe a duplicated question, sorry if it is.
I want to post on a Facebook page that I own. I am using the graph API but I don't know how can I do this.
I have an APP, I'm using it for Facebook login. But I don't know if I have to make another APP just for the extra permissions for publishing on my page because I don't want that the APP ask to extra permissions to the users that are using the Facebook's login in my page.
My goal is create posts to my Facebook page from my website.
Thanks for the help, and sorry for my bad English writing.

Which app do I need to display facebook feed?

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.

Facebook PHP SDK - Post to user's wall as app and not user. How?

I have a few questions about Facebook PHP SDK I haven't found the answers to yet, hope someone here can help.
I have made a page where users connect to Facebook to be able to share things via my site on their wall. I don't want to use the offline_permission. But I need to be able to delay post, cause sometimes we need to confirm choices they use. I read that YOU CAN post at any time with stream_publish, but you need to post as THE APP and not THE USER. Right now I think I post as the user. How do I post as the app?
Thanks!
Read the Facebook Authentication documentation, specifically the section titled "App Login" where it tells you how to authenticate as the application. Basically you navigate to this url: https://graph.facebook.com/oauth/access_token? client_id=YOUR_APP_ID&client_secret=YOUR_APP_SECRET&grant_type=client_credentials and that will give you a session token to act as your page.

How to auto-publish wordpress post to facebook fanpage without a facebook app?

My aim is to make a facebook fanpage for a client who wants his blogposts to automatically show up on his fanpage.
I've already read several posts here in the forums. I've tried several methods to auto-publish wordpress posts to a fanpage in facebook.(notes, ...) The last method I used was making an app and using the "Simple Facebook Connect" plugin for wp.
I got quite confusing with this. I have an app called "myClient" and a fanpage called "myClient". If I publish a blogpost, it automatically shows up on the fanpage but "via myClient". Is there a way on get rid of the facebook app? I don't want to show up the via-sentences because the app is just the connection between wp and fb and has no content at all (the content is on the fanpage)
Hopefully you can help me with that!
Thanks in advance.
Whenever you want to publish something on Facebook, you need a Facebook Application as it's the "trusted" connection between your source and Facebook (this is why you have the App Secret and all the authentication/authorization process..etc).
So, How to auto-publish wordpress post to facebook fanpage without a facebook app?
You can't! But what you can do is changing the App name to something the Client would agree on (and not being "already taken", of course!).
You can use the notes facility available. It is updated when the RSS address you provide updates.
Actually there is a way to get rid of the Facebook App - by using third parties automatic Facebook publishing tools like ZapRobot - in that way you actually lean on someone else's FB API APP. Note that then you give "manage_pages" permission to the third party. The process should be:
1) Register with ZapRobot - this is a Facebook login, you give them posting rights to your page
2) Define a job that posts A LINK (ignore their categories) while the link is pointing to the RECENT wordpress item on your blog
Good luck :-)