Deprecated offline access in Facebook - facebook

I just created last week an App and I've read that offline access doesn't work with newly created apps.(I haven't found any tutorial on the web. I am really new to facebook apps)
with this new change in facebook, I don't know how to use the current thing.
I badly need this feature because I don't want the user keeps logging-in in facebook everytime he visits and posts a status in my site as well in his facebook wall. I just want the user to be stayed connected and be able to post on his wall automatically thru my site once he authorized my app.
Thank you.

There are very clear and simple instructions on the following documentation to explain what you need to do to switch to long-life access tokens:
https://developers.facebook.com/roadmap/offline-access-removal/
Also, from your description, it sounds like you are spamming and breaking Facebook Platform Policies. Users will hate any app that automatically posts on their behalf, so I recommend you do not do that, as either people will stop using your app or they'll report it and it'll get banned.

Related

How to access my business’ Facebook Page Feed from my web server using Graph API?

I have a pre-existing Facebook Business Page set up on Facebook and I just registered my website (App) on the Facebook Developers Console using the same Business name as the Facebook Page name. I am an admin on both the App account and the Business Page. My app is also on the list of “subscribed apps” for the Page. Even still, Facebook doesn’t see the app and page as the same business, and I still don’t see my page in the “App Pages” section of my App Settings like it says I should.
Ultimately, my goal is to be able to establish a communication between my web server and my Facebook Page in order to READ posts on my page using the Graph API. However, when I try accessing the page node or any of its edges using my App Token (via Graph Explorer OR my web server), it’s telling me I need an App review before I can read the public data on my own Facebook page.
My guess is that this is happening because there is still no established connection between the app and the page... and if that’s the case, what more can I do to make the connection? Anyone have any experience with this?
FYI: I’ve read many other posts on this issue and most of them are outdated or don’t give any clear answers to the question. I feel this question is valid due to the privacy changes introduced by Facebook last March.
You need to have your App reviewed, older apps work till August 2018. But as now every review takes a month and there is high change that you are not approved for "Page Public Content Access". Reason for approve denial is "it doesn't appear to enhance the user experience". And after that, there is not much you can do. You can make another app and submit it to the review, with info that might pass the review process.
As for now, i do not know the correct phrases to use in review-form, but if some-one gets "Page Public Content Access"-approval, please let us know how.

Getting facebook page with app_scoped_user_id is not possible anymore?

Below url gaves the user's facebook page till yesterday. But it's not working anymore.
https://www.facebook.com/app_scoped_user_id/xxxxxxxxxxxxx/
Is there any way to get user's facebook page or it's disabled for a security reason?
Unfortunately, Facebook have chosen to disable the ability to resolve app scoped user IDs, so this feature is now gone. Seems they havent yet responded to people registrered to the bug to let them know.
https://developers.facebook.com/blog/post/2018/04/19/facebook-login-changes-address-abuse/
There's a new permission in Graph API 3.0 that provides a URL link for a facebook profile:
user_link
In order to use that, you have to submit your facebook app for review (and likely have a legitimate reason you need this information.
Update: I went through this process, our app got approved for user_link permission, and it works as advertised.
The user_link variable is an app scoped link that will work as long as the app remains approved, and will stop working if the app should get removed or they revoke the approval. So it's a special URL that really only works as long as the FB app is around.
https://developers.facebook.com/bugs/2054375031451090/
Subscribe to that bug to get updated on the status.
There is also a blog entry about this: https://developers.facebook.com/blog/post/2018/04/19/facebook-login-changes-address-abuse/ - so this is actually not even a bug.
This is no longer possible and will not be, according to https://developers.facebook.com/blog/post/2018/05/01/facebook-login-updates-further-protect-privacy/
Your best bet going forward is to open the Facebook site and search for the user name like so:
JavaScript:
Assume user is an object with a property called name that contains the user's name.
window.open("https://www.facebook.com/search/str/".concat(encodeURIComponent(user.name)).concat("/keywords_users"));
In most cases this will allow you to quickly find the person in question, given that you can still display their profile picture using the app-scoped ID on whichever site lists users. It's not great, but it may be of help to someone. We've resorted to this solution in our CRM.

App autopost to Facebook

So, I want to build a web app that posts let say funny cat pics to a users Facebook wall. The user allows the web app to do this via the publish_actions command. Yeah, I know this sounds spammy but it isn't.
Now, on Facebook Developer documentation pages it's described as follows:
"Enables your app to post content, comments and likes to a user's
stream and requires extra permissions from a person using your app.
So, to me this sounds that it's possible for an web app to publish content without the need for the user to grant every single update?
But, reading about it in the "Login Best Practices" section I read the following sentence:
When displaying the Log in with Facebook button, emphasize that
your app will not post to Facebook without people's permission
Source:
https://developers.facebook.com/docs/facebook-login/checklist
So, my question is – is it or isn't it possible?
To my knowledge, the publish_actions permission allows your app to post to the user's wall without having facebook itself ask for permission again.
However, it is good ("best") practice to always make it explicitly clear inside your app that "by clicking here, I will post to your timeline".
Basically, this is Facebook saying that you should handle this asking inside your application, in a way that best fits your application's logic.

How to authorize Facebook App for basic permissions without showing Authorization Dialog

From the documentation it seems that the user should always authorize the Facebook application even to access basic permissions.
However, sites like Rotten Tomatoes and Clicker.com auto-authorize the logged facebook user without showing the authorization dialog. If you visit one of those sites for the first time they will be able to access your public data without you authorizing it. If I go to the Apps on my facebook settings, an entry will appear showing that I gave access to those applications (but I DID NOT).
How can this be possible? Is it related to the "Instant Personalization" feature for selected partners?
Thanks
Well, I was doing some research and yes, it's all about Instant Personalization.
From Facebook:
We've partnered with a few websites to provide you with great,
personalized experiences the moment you arrive, such as immediately
playing the music you like or displaying friends' reviews. To tailor
your experience, these partners only access public information (like
your name and profile picture) and other information you've made
public.
From one of its partners:
Clicker.com
So -at the time I'm writing this- unless you're a partner of Facebook, you'll have to show the old OAuth dialog.
Hope it helps!

Anyone know of a good tutorial for Facebook authentication?

I'm linking my app to Facebook, and would like people to log in with their Facebook account, but I can't figure out how to do this. I had read up on Facebook Connect, but it seems that that's not used any more - but every tutorial I can find seems to refer to it. When I try to follow them, it doesn't work, because the interface has changed.
So, can anyone direct me to a tutorial or guide to doing this the new way?
Basically, what I want to do is this:
A user who is signed into Facebook and comes to my webpage is automatically logged in to my app (with the usual Facebook 'granting permission' windows etc), or can sign in with their Facebook account if they're not already logged in.
I then want to use Facebook to link users with their friends who are also registered on my site, so they can share things.
I would also like to have access to Facebook comments made on wall posts from my site - so the comment stream for a particular post can be seen on my site as well as on Facebook, and comments can be made on either.
If anyone can point me in the right direction (or even tell me what I should be typing in to Google!) I'd be very grateful.
Thanks.
Some sample apps that do many of the things you speak of are shown here. The Graph API is probably your best bet right now for delivering the content and access you need and there are numerous tutorials online for how to use it, including the Facebook Developers site itself.
You will find good Tuts on ThinkDiff, e.g.
http://thinkdiff.net/facebook/new-javascript-sdk-oauth-2-0-based-fbconnect-tutorial/
http://thinkdiff.net/facebook/php-sdk-3-0-graph-api-base-facebook-connect-tutorial/
http://thinkdiff.net/facebook/graph-api-iframe-base-facebook-application-development-php-sdk-3-0/
I know this is an older question, but the current method for authentication is OAuth 2.0.
Facebook provides a pretty good outline of what steps are necessary in this Reference:
https://developers.facebook.com/docs/authentication/client-side/
This example allows the authentication to occur entirely in Javascript on the client side so that you can request a potential user to authenticate via Facebook and then confirm access to your application.
If the user is already logged in, only the access confirmation for your application is performed.
If the user is already logged in and access has already been granted, the user is not required to login, or reconfirm access.