Allow more pages with facebook graph api - facebook-graph-api

My app successfully connects to Facebook using Facebook's Graph API, requests access to the pages I want to post to and redirects back to my app. That works like charm.
My problem is that if I created a new page on Facebook, I cannot add it to my app:
When I try to connect again, Facebook seems to know what I have requested earlier and I'm immediately redirected to my app without the request which pages I want to allow access to.
How to reconnect or what's the normal way to fix that problem?
I use Facebook's PHP Graph SDK 5.7.

#CBroe That didn't work either, but then I've cleared all permissions and chosen to reopen the site selector dialog, chosen all sites and closed, removed the information from my database and reconnected... Now the dialog appeared! Thank you for your help! Helped me a lot!

Related

Need help tracking down a specific website (to identify Spotify account)

I stumbled across a website a while back where it showed the privacy repercussions of logging in to Spotify using the web version. I believe it used JavaScript but I can't be too sure. Anyway, this unrelated website was able to display my Spotify username despite me not authorizing anything. If I remember correctly, it also had slots for other services that I didn't use so it couldn't show my username there.
But what I'm interested in learning about is how it managed to get my Spotify username. Not because I plan to use the method but out of curiosity with how the whole thing works. When I found out about that page/site awhile back, it spooked me enough that I started using a different browser profile specifically for Spotify going forward because of it but I never got around to digging deeper into how it actually did what it did.
Cookies save your an access token for Spotify account after to success login of Spotify.
Next time, if open your browser go to
https://open.spotify.com/
It's java-script to access from your PC's cookies,
call this API with cookies an access token, get your information.
Then display your user name in the web page.
https://api.spotify.com/v1/me
If I copy from my Chrome browser the access-token and API URL,
Then access by Postman.
I can get the my user name.
Each browser has own location to save a cookies,
if you never login before other browser, will not pick up your information.
I did not login before by Firefox.
This is screen of login.

Facebook API - Post to page

I'm trying to figure out how to post to my Facebook page automatically from my website. I have a custom CMS written in PHP that I use with my website, and I have already created the Facebook App and set up the necessary App ID and App Secret. I have PHP code written that when I create a page in my CMS, it will take the Page Title and a blurb of the content and create a post in my Facebook page, however because my Facebook App is not live, only I can see the post.
I've tried to apply for my app to go Live, but have been denied because I do not involve a login process. However, I don't want to log in again. That defeats the whole point of having the extended life access token.
Is it possible to do what I am trying to do? Or is there something I need to include in my app review request to have this approved? Any insight would be greatly appreciated, as the response I get from Facebook is rather generic and unhelpful.
Thank you!

Desktop App Workflow Error When Logging In

Our desktop application integrates with Facebook using the desktop app workflow and for approx. 18 months has been working without any problems. However, we are starting to get reports from some users that they cannot get past the login process.
When the login is successful Facebook should be attaching the access_token to the redirect_uri. Our application detects this and moves the user to the main part of our Facebook integration. What appears to be happening in some situations is that the access_token parameter is missing which causes our application to leave our embedded browser window open with the following message from Facebook:
"Success
SECURITY WARNING: Please treat the URL above as you would your password and do not share it with anyone."
What is strange is that this does not occur with all Facebook accounts and which Facebook accounts it occurs with seems to be changing. For example, we had a report of this approx. 1 week ago but could not duplicate it with my own Facebook account or with a colleague's Facebook account. Today, I still cannot duplicate it with my own Facebook account but my colleague now gets the problem.
The URL our code sends to Facebook is:
https://graph.facebook.com/oauth/authorize?client_id=xxxx&redirect_uri=http://www.facebook.com/connect/login_success.html&type=user_agent&display=popup&scope=read_friendlists,user_photos,friends_photos,user_photo_video_tags,friends_photo_video_tags,user_events,friends_events,user_groups,friends_groups
Reading the latest API documentation it looks like they recommend a different way to connect which we have also tried:
https://www.facebook.com/dialog/oauth?client_id=xxxx&redirect_uri=http://www.facebook.com/connect/login_success.html&scope=read_friendlists,user_photos,friends_photos,user_photo_video_tags,friends_photo_video_tags,user_events,friends_events,user_groups,friends_groups&response_type=token
To rule out our application as the cause we have tried these URLs directly within a web browser. What we find is that when using my Facebook account the browser re-directs to the success URL that includes the access_token parameter but when using my colleague's account the browser re-directs to the success URL that includes the access_token and then immediately re-directs again to the success URL without the access_token.
so... As far as we can tell this is either:
a) A change to the API which we cannot find documented anywhere
b) A bug in Facebook
c) Something that is now controlled by the user's Facebook security settings
Is there anybody who could explain why Facebook is acting differently with different accounts and how we can go about fixing this?
Thanks.
Kevin.
I have the same problem in my desktop applications.
And I just solve it with careful reading in ht*ps://developers.facebook.com/docs/howtos/login/login-for-desktop/. The solution is to change redirect_uri from ht*p://www.facebook.com/... into ht*ps://www.facebook.com/...
Hope this will help you just like it help me
NB:
change ht*p into http
sorry i have to change the http into ht*p so that i can post the answer.

Can I prompt a user to log in to facebook through a bookmarklet generated div?

I'm looking to see some info about my facebook contacts, and I want the info to be overlayed on the currently open website.
Currently, I'm trying to do this via a bookmarklet.
Is it possible for me to overlay a div over the currently open web page and populate it with a functioning facebook login button (if the user is not logged in)? Are there publicly available working examples of something like this?
It is probably not possible to simply embed Facebook within an iframe because Facebook blocks people from embedding their pages within frames or iframes by putting this into the response header, "X-Frame-Options: DENY". This is most likely to prevent click-jacking and similar security exploits.
To test this, enter any page from Facebook into http://savanttools.com/testframe
Facebook has an API which allows you to do many things, but it requires server side code, and can not be done simply with a bookmarklet.
There is also always the brute force method where your server scrapes data from any website you want it to. Then that data could be put into a bookmarklet.
Finally, the same thing could be achieved by writing an add-on or a user script without using a bookmarklet at all.

adding app to facebook page

I'm new to facebook apps, and actually all I want is to add a 'contact us' tab to a 'like page' that I'm helping to manage. I have setup a server with PHP code, and opened an facebook app. (I left the SSL part empty because my server dose not support SSL.) And now I'm just trying to add the app to the page, but I can't find where... It's probably just a link I haven't noticed yet, but I can't find it.
I've googled around the internet, but all explanations I found where old, and didn't help me.
Just for clearness: I want to know how to add an existing facebook app to an existing facebook page
Thanks.
https://www.facebook.com/dialog/pagetab?app_id=YOUR_APP_ID&display=popup&next=YOUR_URL
Here the documentation
https://developers.facebook.com/docs/reference/dialogs/add_to_page/