Facebook Graph API- bypass privacy warning modal? - facebook-graph-api

Built an application that uploads videos to a users timeline.
The first time they use the app and log in to their facebook account they are presented with a 2nd facebook Privacy modal.
<appname> would like to access your public profile, friend list and photos
Is there a way to somewho bypass this modal by changing the facebook application security settings?

Simple answer: no.
This is the basic scope that is implicitly added by Facebook to your request. Each scope has to be approved by the user. There is no way to programmatically or configurably skip this dialog on your side.

Related

How to use facebook's Webhooks for non admin pages?

Am trying to use Facebook's Webhooks for pages to get feeds and ratings notification. Am able to get notification if I'm the admin of the page but am not able to get any notification for the pages I'm not an admin, even though I hold the page access token which is been granted by the admin of the page to my App.
I tried calling
https://graph.facebook.com/v2.6/<page-id>/subscribed_apps?access_token=<page-token>
but got
{"error":{"message":"(#200) User does not have sufficient administrative permission for this action on this page.","type":"OAuthException","code":200,"fbtrace_id":"BzRm1gqdTBH"}}
In Facebook documentation, its mentioned "page-related RTU objects will require that your app be installed on the page". Have installed my App in the respective page as page tab. Still its the same.

Facebook permissions - login flow

I am facebook development newbie and have problems with understanding login flow.
What I want to achieve:
I need access app user's pictures from the album created by the
application (preferably also when users are offline).
I run through facebook samples and stackoverflow questions and what I managed to do is:
I use facebook authentication with user_photos scope as follows:
however the script retrieving list of albums gets an "An active access token must be used to query information about the current user." error.
So I added:
Grant Permissions to Allow access to Photos and Albums
The scope is exactly the same, so I don't understand why after clicking that button retrieving the albums works.
The problem is that after refreshing the page, app recognizes that I'm a user who uses the app, but the albums are not accessible again.
How can I make app to get the permission to access pictures permanently?
I suppose it should be possible to access them also when the user is offline (if the album is public)?
The problem was that script accessing data was loaded faster than the user was verified by facebook. It worked with a button just because clicking a button gave application needed time buffor.

Why can't an app have direct posting permission to it's app page?

I am writing an app which is basically a service that posts media release news to various social networks including Facebook. I understand the usage of app tokens vs. user tokens vs. page tokens through the Graph API, but what I don't understand is why it requires a user token for an app to post to the app's page. User administrators will change over the lifetime of an app, it makes far more sense that an app would automatically have the necessary permissions to post to its own page's wall. This would also cut down on all the handshaking through the Graph API that seems to be required to get things done.
So, in short, why do Facebook App not have direct posting permission to their App Pages?
Because every post has a user associated with it – the user who created the post.

How to perform instant Facebook login for a link to Facebook login-enabled site

I wonder what is the right technique to streamline the login to my site via Facebook.
Currently, I have a web site integrated with Facebook Login button. Right now, it's an independent web site, and not a "Facebook app" (running in the canvas). While this is not my decision, this could change in long term if matters.
The way the authentication work: the "fb-login-button" is redirected to my application URL using onlogin() event; the server side uses the cookie to retrieve the "access token" and perform further Graph API work. The business logic resides on the server side.
The current business requirement is the following:
Suppose someone posts a link to my site, somewhere in Facebook, for example in our site community page:
http://www.mysitedomain.com/offer1
A Facebook logged-in user clicking on the link - should get to the target page, after his Facebook identify got verified, and the result should be personalized for that user.
If a Facebook user already has an active session with my site - trivial.
Assuming a user had approved my site (app) in the past, but has no active session - here I am looking for the best practice to do the login.
Also, I would appreciate a hint how to handle the app authorization (i.e. showing the Facebook authorization dialog) in a most efficient way.
Thanks for any hint.
Check out FB Login Architecture and FB.getLoginStatus. Based on FB documentation, If you use javascript sdk, it only triggers a Popup on the same page and once authenticated it will go back to the same page. So once the login status is confirmed then you can get users information from graph api and update via AJAX on your page. You can also checkout this server side login. Hope this helps.

Developing a Facebook app that will appear in Facebook pages

I want my Facebook app that I'm developing on, appears as an iframe in several fan pages that I have on Facebook.
is this possible to place a facebook app on a Facebook fan page iframe?
if so will my users need to approve my app on each page or will one-time approval for the app will approve it for him in all my fan pages?
Yes this is possible, please refer to Page Tab Tutorial and Apps on Facebook.com documentation for details on how to do this
User only need grant access to application once, on other Pages same application will get all user details (This isn't required, if you application doesn't need user identity to work, you can skip this at all)...
Facebook grants permissions by app id, so no matter how many pages you put that app in, it will only ask for perms on one page.