I'm doing project for a customer. And we are using FQL link_stats to get the count to display on the website.
Recently it was working fine, and still working fine on our staging environment. However in the live site, we are getting zero counts.
This is a sample of the FQL.
https://graph.facebook.com/fql?q=SELECT%20url,%20normalized_url,%20share_count,%20like_count,%20comment_count,%20total_count,commentsbox_count,%20comments_fbid,%20click_count%20FROM%20link_stat%20WHERE%20url=%22http%3A%2F%2Fwww.channelnewsasia.com%2Fnews%2Fworld%2Fus-senators-reach-deal-on-gun-sale-backg%2F634558.html%22&callback=_ate.cbs.rcb_httpwwwchannelnewsasiacomnewsworldussenatorsreachdealongunsalebackg634558html0
And we notice that if we are to run the FQL in the FB debugger tool, with access token. We can get the correct results. But without access token it will get the same result as above.
I know that FB is changing this behavoir in july 2013 to make link_stat required access token. As mention in their roadmap. https://developers.facebook.com/roadmap/
However it is mention that this will only kick in after 10th July 2013 only.
Related
What is the correct way to start using Instagram oEmbed feature? Documentation (https://developers.facebook.com/docs/instagram/oembed/) claims that I have to pass App Review to start using the feature. And application form says Please provide a URL where we can test Oembed Read. Which I don't have because I have no access to the feature.
What I have tried with no success:
I requested instagram_oembed resource with:
app token of application in live mode
app token of application in
development mode
passed URL to a post by official Instagram account
(e.g. https://www.instagram.com/p/CQG4gZxMzzO/)
passed URL to a post
of a user who is Admin of the app
In all cases I receive (#10) To use 'Oembed Read', your use of this endpoint must be reviewed and approved by Facebook. To submit this 'Oembed Read' feature for review please read our documentation on reviewable features: https://developers.facebook.com/docs/apps/review.
Example of the request I do https://graph.facebook.com/v11.0/instagram_oembed?url=https%3A%2F%2Fwww.instagram.com%2Fp%2FCQG4gZxMzzO%2F&access_token=appAccessToken
We're also suffering from this issue, but so far, we thought we already figured out how to do that.
Big picture
Facebook had not sorted this thing out correctly. Or at least, we don't know why they put such a restriction to this API.
The official document is not correct. (or at least not accurate for now, for some part)
Which part was not correct?
The access token part is not right. Or at least, it's the most confusion part.
How can we resolve this?
Use the Graph API Explorer
Adjust your token(App token, Client access token, user token) with the official URLs(see below) to see if you can get the result
most of us should be able to get the result with user access token, which means you have to access this API after login!
Integrate into your app for review
The review page is also confusing:
Please provide a URL where we can test Oembed Read. Include the URL of a page, post or video from our official Facebook or Instagram pages, or the pages themselves., it means you can only use links like https://www.facebook.com/instagram or https://www.facebook.com/facebook
With that in mind, so far, the only way to get approved is integrate your oembed usage into your normal UI with facebook user access token ready
Question to the big picture
So, we have to ask user to login with our facebook app, then we can provide this oembed read API returned embed HTML? I'm afraid that's what we have now.
big companies might be able to apply for App Token, I guess in that scenario, facebook login is not necessary
for small companies, indie developers, hmmm, I don't know any better solutions so far.
I have run into this too. I do not have an answer at this time, I just want to report on the frustrations of their 'app review' process. Which makes it feel like you are unlikely to get it to work any time soon.
We have a custom embed code for our weblog authors to use (a shortcode kind of thing) which does the oEmbed call. We just take the HTML from the resulting JSON, and insert it into the weblog article page, and that is it. It stopped working, presenting this same error - in live mode, and in development mode.
The kicker is, I then tried submitting it for app review. Filled out everything I could to the best of my knowledge. Provided them a test account and post on our weblog to show the shortcode editing and expected placement. We got rejected. Why? Your embedding resulted in an error, we can't see it in action to approve you.
Yes. The error I am getting is that I need my 'app' to be reviewed and approved.
This is an infuriating process. This is the only Facebook / Instagram API feature we use at this point. No user data. No attempt to make an Instagram clone app or anything like that. Just an embed.
And they are making this simple use case as impossible to use as they can. And the documentation also feels like an infinite loop. They say users of the old Instagram embed call have until September 7 2021 to get approved. But the call does not work at all because we are not approved. So we cannot get approved.
Same loop here. I've managed to report it to Facebook team and get answer "Just submit your Instagram post URL"! I can't believe it, its can't be so simple. I've confirmed it few times with Facebook team person and.... get rejected!
Also, second form in App Review process will LOWERCASE all of your links and I've spent few days just to explain it to reviewers and support person. Still rejected after submitting proper url. This is insane.
My another attempt was about to build a test page where I can auth via Facebook account, parse connected Instagram accounts and GET embed endpoint with user access key in hope that reviewer HAS access to oembed feature - REJECTED. I can't even find what permission I need to add to auth URL to obtain oembed thing.
Will update my answer with new information later.
UPDATE: After reporting about the issue with lowercase URL in submission form they just APPROVED my app without APP REVIEW. Well... Facebook style...
I had exactly the same problem recently. Updated the packages with compose, changed the API version from 10 to 11... without any change.
The error was also occurring in development mode, it didn't make sense that Facebook was asking to approve in dev mode.
For me, the problem came from the management of scopes in my application, depending on the version of the Facebook API used.
My advice: check the scopes defined with API version in your code first.
I had the same issue and the solution is very simple. The only thing you need to do is copy paste an instagram url in the input field saying: Please provide a URL where we can test Oembed Read.
I did the this link: https://www.instagram.com/p/G/
Which is actually the first instagram post :) Got approved. Hope this helps everybody!
I have a friend that runs a small nonprofit which helps find placement for dogs that have been brought to animal shelters. This organization has a Facebook page that allows volunteers coordinate and donate funds for these animals.
I had created an application that uploaded posts, downloaded and edited posts, and downloaded comments.
It did so using standard HTTP protocols with a Facebook Access Token. The token was obtained by going out to the graph explorer and copying it to the application.
This worked perfectly well until July – 2, when the two thousand or so post that were already uploaded and visible just disappeared. Oddly, it is now possible to use the tokens from graph explorer again, but they are giving erratic results and all the posts prior to July-2 are still missing.
Does anyone understand this behavior? And if so does anyone have any suggestions on how I could fix it?
Thank you,
Demetrius
Unfortunately, Facebook seems to have removed the ability to post from outside of their own apps.
See How to post to user's facebook feed
My app integrates Facebook login with the following permissions :user_education_history and user_work_history. The app was working just fine until today morning when I attempt to login I get the following error:
invalid scopes: user_education_history, user_work_history. This message is only shown to developers other app users will ignore these permissions if present.
I went through the docs and I discovered that they were deprecated on the 4th of this month but I cannot seem to find the new permissions for the education and the work history ... any help ?
Facebook is removing access to a lot of things as a result of recent negative press surrounding data mining of their users. In almost all cases the information is simply no longer available, there is no alternative method to access it.
More information is available in the Facebook developer blog:
https://developers.facebook.com/blog/post/2018/04/04/facebook-api-platform-product-changes/
https://developers.facebook.com/blog/post/2018/04/24/new-facebook-platform-product-changes-policy-updates
Note that the message you mention is only shown to Facebook accounts with developer credentials. Regular Facebook users don't see this message and the Facebook API simply ignores requests for scopes which are no longer allowed. If the data being requested are optional in the context of the app, you should create a test Facebook account and see how it behaves when requesting the data doesn't return anything (or causes unexpected errors).
We have a Facebook app that publishes URLs to a user's newsfeed via the Facebook iOS SDK. These URLs are for pages that have OpenGraph attributes defined and we've verified in the Facebook Linter that it's correctly defined.
However, periodically we are seeing that Facebook won't correctly parse the OpenGraph attributes and have less than a stellar post to Facebook:
We will most often get posts parsed correctly resulting in posts like these:
We'll periodically get posts like these:
However, you can see this later post works correctly in the FB Url Linter: https://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fchewsy.com%2Fr%2Fa%2F1bhLT.
However, sometimes the URL Linter will report a 503 but I see nothign in our logs. And even more odd, when the URL Linter reports the 503, it will shows that it can read the OpenGraph attributes defined. See this screenshot:
Since this is inconsistent, my first guess was this was a Facebook issue so I opened a bug. However, since I'm not seeing this issue rampant in the newsfeed with other apps, I'm starting to wonder if we aren't following the right steps to publishing FB content.
For example, are we supposed to post to the URL Linter first, then publish via the Graph API? This seems like a ridiculous extra step, but I'm grasping at straws here...
It's probably due to fact that in a time Facebook Linter visited your site it wasn't accessible, just couple of refreshes on a Linter Tool with URL you've provided resulted in Bad Response Code error, returning 503 status code:
http://chewsy.com/r/a/1bhLT"">
You should dig in logs of your application/site to discover the real reason why this happen and fix it.
Just a quick note that this should no longer be happening for CloudFlare users. We pushed a fix for the 503 debugger issue moments ago that appears to have fixed the problem. Please contact us if you see any other issues with the Facebook Debugger.
I have a number of PHP scripts that pull data from my Facebook profile.
I had set these up with an Access Token that I took from the Graph Explorer.
https://developers.facebook.com/tools/explorer/
I ensured that when generating the tokens, I asked for the offline_access extended permission.
These scripts worked fine for months, but over the last few days, I notice that whenever I logout of Facebook, the token becomes invalidated, and I have to log back in each time and get a new one.
My understanding was the an offline_access token survives a logout, but not a password change.
Has something changed in this regard?
I've done some more research on this.
FB are deprecating the offline_access permission. That means it will no longer be possible to obtain an access token that gives your app open-ended permission to query a user's data.
Instead, your app will have to test the validity of any existing token, and it that token has expired, you will be able to swap it for a new one. Previously, if you had an expired token, you had to send your user through the auth process again to get a new one, so this is actually a positive development.
See: https://developers.facebook.com/docs/offline-access-deprecation/
In my own particular example, where I was using a token obtained from the Graph Explorer in a PHP script that queried the Graph with cURL (ie independently of a user session on FB), I can't however do this.
The Graph Explorer is an app in its own right, and it seems that in the last few days it has switched on the deprecate_offline_access migration in its settings, which means existing offline_access tokens obtained via Graph Explorer will now expire on logout.
Also, I can't issue a request in my script to swap the token, as this requires the APP SECRET for the Graph Explorer app, which I don't have.
Therefore, existing offline_access tokens obtained as part of the standard auth process should continue to work, but offline_access tokens obtained via the Graph Explorer will not.
This effectively means that it is no longer possible to script interaction with the Graph where Extended Permissions are required. All such interaction will now have to occur within a user session.
I can see the logic in this, but its a bit of a spanner in the works for cron jobs etc.
I might suspect that with the change-over (while Facebook code is written to handle both old and new ways) that there might have been a bug introduces. If you can reproduce this issue, then it should be filed as a defect with Facebook at http://developers.facebook.com/bugs.
I've checked using a basic access token with a brand new app. I only asked for offline permissions. I checked the token in the linter and it says it was ok. I logged out of facebook then back in. Then rechecked the token. And sure enough it was invalidated. In my app settings I have deprecate offline_access set to Enabled.
For my next test, I set it to disabled and checked again. Sure enough Facebook invalidated that token.
For my next test, I checked with an app created a few years ago. It has the deprecate offline_access turned off. And sure enough it was able to keep the offine access token current and did not invalidate it at all.
I also tested with an app I created during last year's F8 conference, and it also behaved correctly (not invaliding the offline token) when I logged out of facebook.
So, I guess it might depend upon how long ago your app was created.