I'm trying to get all of the videos of my stream.
When I go to http://developers.facebook.com/docs/reference/api/ and click on the news feed (me/home) link, using that access token, I see my entire stream, including videos.
However, when I fetch the stream (me/home) from my app, it shows me the entire stream except the ones with type:video. I also tried it in the graph explorer and I have the exact same problem there. In my app, I've tried enabling permissions including user_status, user_videos, user_photo_video_tags, friends_status, friends_videos, friends_photo_video_tags, read_stream, and offline_access. None of these help.
I even tried turning on every single permission and it doesn't help. (If I just want to get my own videos--me/posts--that works fine.)
I also tried FQL and, while I'm a beginner at that, it seems to have the same problem.
So, can others see videos in me/home? Am I missing something obvious? Or is it a facebook bug? (I couldn't find that in their bug DB).
Thank you.
Appears to be a bug. You should go there and mark that you can validate it. Also subscribe to the bug so you know when it get's fixed.
http://developers.facebook.com/bugs/231621496918030
Steps to Reproduce: 1. get an access token using the read_stream
permission
call me/home api
https://graph.facebook.com/me/home?format=json&limit=25&until=1326865528&access_token=AAAEVaIcG7E0BADwZCmtcqokmLMikQqAIcE5zaUgZCtXEVlOTRVma18db7M9WWr1EcjNZAAzVhAK7LgSrGjTOlGqF3SDrMSnk4BHP3ZBC5gZDZD
no data returned, but when I switched to the Graph API Explorer app in
the test tool with the same permission. it returns 25 entries.
Expected Behavior: all feed posts in the stream Actual Behavior: none
or a few entries
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 am trying to run some queries on Microsoft Academic Graph using their API. I cannot figure out what to use for the Ocp-Apim-Subscription-Key. (I have seen this question and it did not help.) When I try to run queries I get the following message (401: access denied): Access denied due to invalid subscription key. Make sure you are subscribed to an API you are trying to call and provide the right key.. This happens either using curl on the command line:
curl -v -X GET "https://westus.api.cognitive.microsoft.com\
/academic/v1.0/evaluate?\
expr=stochastic&model=latest&count=10&offset=0&attributes=Id" \
-H "Ocp-Apim-Subscription-Key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
or using the API testing console.
So what am I using for the Ocp-Apim-Subscription-Key? (Not a lot of Xs!) I've tried two things. First, I've tried using the key that you can get by going to https://labs.cognitive.microsoft.com/en-us/project-academic-knowledge and clicking on the subscribe link (either Key 1 or Key 2).
Second, I've tried using a key generated by going to the cognitive services on my azure portal, and trying to create a subscription to a suitable service. However, nothing that I can see matches the Academic Search API that I want to use, so I used a generic bing search subscription.
Neither of these grants me access to the API. What am I missing?
EDIT:
After first response by #ali-heikal, I tried going to here: https://dev.labs.cognitive.microsoft.com/docs/services/56332331778daf02acc0a50b/operations/5951f78363b4fb31286b8ef4/console. A red warning box appears at top of page: You are not subscribed to this API and will get a '401 Access Denied' response. To subscribe, go to the Products page and click on the desired product containing this API.. If I go to the Products page, and go on to the Project Academic Knowledge - Preview page, I am offered the chance to subscribe. Clicking subscribe takes me to a generic MS sign in (I am signed in, choose that account), I am taken to a page which says:
We're unable to complete your request
Microsoft account is experiencing technical problems. Please try again later.
So this does not work for me. Where is it documented that I should use this endpoint? Can someone provide further instructions on how to use it?
EDIT2:
There is this answer which describes using a different endpoint: https://stackoverflow.com/a/49318405/54557. However, changing my curl request to use this does not work (with same Access denied error).
You're using the wrong endpoint, since you're using the Preview API, then you should use the Preview endpoint as well.
It should work if you follow those steps:
Regenerate a key from here (do not use an old key this time) and confirm by clicking the Yes, regenerate this key button
Open the Testing Console from here
Insert the key you just generated into the Ocp-Apim-Subscription-Key field
Insert the following into the Request body field: expr=Composite(AA.AuN=='ali heikal')&count=2&attributes=Ti,Y,CC,AA.AuN,AA.AuId
Click the Send button
Check the Entity Attributes documentation here to understand the attributes I included following the Evaluate Method documentation here
I think the problem is that you are using an old key with the wrong endpoint and attribute values.
I am trying to get information about events taking place in a club from their Facebook page. Problem is, that the club doesn't create the events itself. They just post links to the events on their wall. I have troubles accessing the links.
What I tried:
GraphAPI PAGE_ID?fields=posts.fields(link)
This returns all posts, but the link field is empty in the posts with link to an event.
GraphAPI PAGE_ID?fields=links.fields(link)
This works perfectly, when queried in Graph API Explorer. I get correct links to the events. However, when I use this by php sdk, I obtain only part of the links. The newest link I get is from September, even though there are lots of them after that. All of the links are public. Even if I am logged out, I can see them.
I also tried using FQL, but it didn't lead to anything. I am quite convinced, that the second way should work and I can't figure out, why not.
EDIT:
I tried to query directly the links by their ID. When I ask for the link, that I didn't see by the method 2 above, I get "Unsupported get request" error. I think it might be problem with permissions, but I don't understand, why I can get the older links then.
this shouldn't be this difficult. I assumed it was a permission thing, but then it doesn't make sense when the graph API gives me the information but the FQL doesn't. :S
so I'm just trying to get the stream from my public page:
http://www.facebook.com/207941570907
So I'm using their tool:
https://developers.facebook.com/tools/explorer
And I give the Graph API Explorer every single permission and I run this:
https://graph.facebook.com/207941570907/posts
And that works perfectly.. but I want to use FQL instead. So I figure running the following would be EXACTLY the same, but no data appears?! It WAS working a month ago, but I don't know what they changed.. sigh:
https://graph.facebook.com/fql?q=SELECT post_id, message FROM stream WHERE source_id = 207941570907
Does anyone have a clue what I'm doing wrong?
I was able to get, using the graph API explorer, the posts from pages I admin. I currently have all permissions for the access token I'm using.
Using the Graph API Explorer tool, I'd suggest looking thru the permissions to see which one you are missing. Or start with all permissions and start taking one by one off until it breaks.
I have tried posting to some different friends feeds. Sometimes the message does not show up on feed even if a get a "good" response back with a new graph api ID.
100002842168248_146917358746335 does not work for example
I don't get any errors or similar only a new ID for the post and when I try to access via graph api (developer console on FB) it return simply false?
https://graph.facebook.com/100002842168248_146917358746335
Using the same call but for another user is showing up on facebook feed without problems. Is there any more action I can take or should I simply take my "false" and give up.
It's probably a privacy/permission settings issue. If the user who's Wall you are posting too has it set so only Friends can view their Wall, you will not be able to view the post (via the Graph or otherwise) - even though your App made the post.
You can also get 'false' if, although the post is visible on Facebook.com with no problems, the user who posted it has opted out of Facebook Platform. This is a privacy setting which disables any apps from accessing any information about a user, their posts, etc.
Even if their posts are 'Public' on facebook.com, the API won't return anything about such users.