I was hacking on a quick side project and I noticed that the graph API doesn't let you see the link of posts in a group.
For example: this graph object has no information about a link. The actual post, however, has an attached gif.
Am I doing something wrong or is this not possible with the graph API?
You're right. What's even stranger is that with a valid access token you still cannot see the link information on that graph object. I wonder if this has a deeper issue below it. You should log it as a bug at http:developers.facebook.com/bugs and report back with the bug # here.
Related
In Facebook Graph API v2.3 it was possible to get all links belong to specified page using "links" edge:
GET v2.3 {page_id}/links
This request shows really all links (not only published, which are accessible by /feed request). Graph API Explorer still can execute this request.
But all new Facebook applications can use only Graph API v2.7, not older. FQL also was deprecated at 08.08.2016.
So, how can I get all links from page (not only published) by Graph API v2.7 from my application? Even dirty hacks are appreciated, thank you.
Upd.: Links posts are promotable posts. They did not showed by /feed, only by /promotable_posts, which is necessary endpoint for my needs. I've found also a necessary parameter for this endpoint which shows really all links posts: include_inline.
So, final request is:
GET v2.7 {page_id}/promotable_posts?include_inline=true
GET /v2.4/{id}/links and GET /v2.4/{id}/statuses will no longer be available beginning in v2.4. As an alternative, we suggest using GET /v2.4/{id}/feed.
Source: https://developers.facebook.com/docs/apps/changelog
So you will have to use the feed endpoint and filter out links on your own.
I have had a crack at this on the Graph API Explorer, but it returns nothing, not even an error. I used the API endpoint save.saves as described here.
You referenced a link to the Open Graph stories section in the docs, that´s something completely different. Afaik there is no way to get access to the saved links with the Graph API, at least not at the moment. If they ever make it available, you will find the endpoint here: https://developers.facebook.com/docs/graph-api/reference/v2.5/user
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.
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
I found a very similar question here: Actions do not appear on timeline, but the solutions offered there are not working for me.
I created a custom graph action and a custom graph object through my Facebook application, and the process of publishing seems to be working fine. When I post the data using the JavaScript SDK with my access token and the object ID, the Facebook API returns the ID of the action, which I can then access on the graph. This side of things is clearly working, since accessing the object via the graph with my app's access token returns all the information it is supposed to.
However, I see no record of this action on Facebook itself; not on my app's timeline, not on the aggregation I set up for this action. The solutions offered in the link above entail double-checking the validity of the meta tags, which I did using the debugger, and also ensuring that there are no URLs within the meta tags that are inaccessible, which is also not the case. Is there anything else that could prevent these actions from showing up on the timeline?
Thanks!
There can be some permission error for facebook (and thus global users) for some url. If you get the action response id, it has to be in your facebook timeline at least (not in others excluding the developers and testers of your app) and it really occurs almost real time.
PS: If you found a similar questions elsewhere, please try to go on with the discussion there instead of creating a duplicate question.