PHP Facebook SDK publish posts in Fan Page - php

I have created an account in Facebook Developers, and I've generated the token with long live (never expire). I've correctly published the post with my script PHP. The problem is that the only person who can read it is me. It isn't published in my Fan Page. It is neider published in my personal profile. It is in an intermediate point between my personal profile and my Fan Page.
The app created in Facebook Developers is active and published. I just want to publish my blog posts in my Fan Page.
The permissions configured in my Access Token are: manage_pages and publish_actions. I have in another platform and it works perfectly. Can you give me any suggestions? Thank you in advance.

Your app is not made public yet (check app dashboard, Status and Review tab, “Do you want to make this app and all its live features available to the general public?”) – as long as it is not set live, all content created through it will only be visible to you.
You always need to do this for each api key.

Related

Auto-Publication with Facebook API

I have a client who has recently raised a problem of self publishing articles facebook. The client has created his application that seems correctly configured but the publication does not appear on his page. The message sent back by the facebook API is the following: (# 100) Parameters of the URL have the ability to specify the picture, name, thumbnail or description.
The Oauth connection is running correctly, the problem is with the publication.
To perform tests on my side, I became an administrator on its facebook application and then filled in my own page created for a long time already. No problem to publish on my personal page with the API facebook. I created a second page always with the same account then changed the url of the page on which to publish and I reproduce the problem. There seems to be a problem checking the user's rights on the page.
While searching on Google, I could find that is a security implemented on version 2.11 of the API with the domains but I did not find any way to solve my problem. Does anyone have a solution? Why I can publish on old pages but not on new pages created from the same account.
Thank you in advance for your assistance and sorry for bad english :)

How to get a facebook page access token without getting my app reviewed?

I am trying to fetch the latest Facebook posts from our company's page to show them on our website. It already worked until a few weeks ago, Facebook unfortunately changed some of their security guidelines. Initially I sended some requests to the Facebook Graph API using PHP, the App ID, the App Secret and the User Token to create an page accesstoken and fetch my company's posts.
Thanks to the new guidelines new created Apps do not have the "manage_pages" permission you need to create an page accesstoken. To recieve this permission you have to get your App reviewed by Facebook which seems quite laborious to me.
Can you think of another way to fetch my posts? I mean those are posts from a page I created. I do not really understand why there are so many security issues.
Thanks!
You don’t need to get your app reviewed, if it is not intended to be used by the general public.
App Development FAQ: My app is only used by a small number of people, who are all listed in the Role section of the App Dashboard - do I need to go through Login Review?
No, it does not have to be reviewed. If your app is only used by a very limited number of people […] it's completely normal to list them all as having different roles in your app's dashboard. They can be listed as Admins, Developers or Testers
Instead of using "https://graph.facebook.com/v2.8/me?..." to fetch just posts from my own pages I am now using following URL to fetch any public posts:
"https://graph.facebook.com/v2.8/{PAGE-ID or PAGE NAME}?fields=
name,picture,feed.limit(100){full_picture,created_time,message,likes,
comments,type,link}&access_token={USERTOKEN}"

Use facebook sharer.php to share on a page wall

I want to link a user to make a share post on my fb company page without having to authenticate. Currently I can get them to share on their own wall with:
But I'm not sure how I can get this to share to a page's wall rather than their timeline.
I got somewhat close by using the dialog feature:
https://www.facebook.com/dialog/feed?app_id=xxx&link=xxx&picture=xxx&name=xxx&caption=xxx&description=xxx&redirect_uri=xxx
But that just showed it as a normal share but done "via appName", unless there is a step I'm missing to link my app to my facebook page?
Thank you!
Unfortunately, the sharer.php method is used only to share only on the user's timeline.
If you want to ask the user to post on a page's timeline, you have to create an app, ask the user to authenticate it and then use the Facebook APIs to post on their behalf. I guess that will be cumbersome in your case, so I would just suggest you redirect to the particular Facebook page.
You can't !
To publish on YOUR page timeline, users need to have the rights to do it (be admin, writer, ...) : it's a manual requirement on the Facebook interface.

Facebook App Insights don't reflect changes at likes and comments

I'm trying to develop a Facebook App that works using Unity3D as front-end but using a PHP Web server to do the Facebook request saving the private key there.
I tested various things like uploading photos and comments an then it get reflected the new App Insigths of the App as Stories Published.
The thing I can't achieve is to see the Likes and Comments of those Stories, it remains 0.
¿There is something that I don't understand about the Likes/Comments there, or I'm doing something bad?
Thank you all.
P.D: Sorry about my English ^^'
Edit:
I can't provide example code of what i've done but I can explain it.
Actually my front-end do get requests to a backend PHP server that do the requests to Facebook.
When a user want to log in the server return the login url in a string and the front-end launches a Internet navigator (in my case is Google Chrome).
The callback url given to Facebook go to a site that closes automatically the navigator and putting in first plane my front-end.
From there you can do the request to the back-end to publish stories in Facebook and then log-out
Actually this is what my application do and it works. The only problem is that the comments and likes that those stories got are not reflected in the App Insights section.

Web app posts only appear of company page when logged in

I am very quickly getting sick of facebook. Please please can someone explain to me why the following is happening.
I have an app which posts to the users feed.
We have set up a company page and this page has the app installed
The app settings are: This app may post on your behalf, including status updates, photos and more.
The app also has the following setting: Who can see posts this app makes for you on your Facebook timeline? EVERYONE
The php page posts to the company page
so why does the following happen (I am going insane!)
THE POSTS ONLY APPEAR WHEN I AM LOGGED INTO THE FACEBOOK ACCOUNT. When I visit the page as a normal user the post are not visible.
Now the point of having a company page and posting stuff to the page via the app is so that visitors can see it.
The app is installed. You can post updates to the page and the app permissions says that posts made by this app can be seen by everyone. Am i just be stupid or is the facebook API just a pile of crap???

Categories