Unable to get page feeds that are shared from a facebook profile - facebook

Ok I get some restriction from facebook which I am unable to find in developer docs.
When I request data from facebook using
https://graph.facebook.com/{user-id}/feed?limit=1&locale=en_GB&access_token={access-token}&fields=id,from,message,link,actions,status_type
Everything works ok for profile. Though for a page it provides feeds, that page has created and shared from other pages, but it never returns feeds which are shared from a facebook profile.
I tried sending some other parameter in fields, but nothing works for me. Any suggestions?

ok, I think I get the answer. And it is impossible as it is a restriction from facebook API since API 2.0
I get some answers from facebook team on this. Below is the link to it:
https://developers.facebook.com/bugs/1057965060965057

Related

Get the post feed of a public facebook page

I'm working on an app and I need to pull in the public posts from the page of a business. I do not want users to login or send any information back to Facebook, I just need the posts so they can be shown in a read-only format.
I've looked around and from what I've read, Facebook offers ways to authenticate your connection to the API, but for security reasons you shouldn't make the calls directly from your app. I've seen something called a client token mentioned, that is assumed to be insecure, but I can't find much mention of it outside of https://developers.facebook.com/docs/facebook-login/access-tokens. It says it can be found in the app dashboard, but I have not been able to find it.
How do you make a call to get the posts of a public facebook page from an iOS app?
I ended up finding something that wasn't quite what I was looking for, but still got the job done: Facebook Page Plugin
It lets you embed the publicly available feed of a Facebook page into a web page. If you want to use it in an app you can host the web page that has the feed code in it and then load it into a web view in the app.

Facebook Ads API - Read Comments

I'm trying to read the ads comments using the Facebook Ads API v2.8. I have reached all of my campaigns and ads, but I didn't find in the docs the path for the comments.
I've searched over internet and everyone says that it's possible, but, or the post is too old or they dont explain properly (maybe I didn't understand properly).
Obs.: I'm using CURL, but if you have some JAVA code, it's alright for me.
Ads are merely a wrappers around posts (in most cases). Typically these posts can be unpublished, but you can promote published posts too.
All the social activity like likes/reactions, comments or shares happen at the post, not at the ad. When you realize this, then it's clear the comments need to be read from post itself.
To get post ID from your ad ID you can use following endpoint
/<ad_id>?fields=creative{effective_object_story_id}
From there you take the effective_object_story_id, which is your post's ID (you can even open https://facebook.com/<post_id> in your browser)
The post's comments can be accessed on following endpoint
/<post_id>/comments

Tag persons in Facebook page post

I've written a Facebook web application, which is able to post links to the app page feed (as the page) by requesting the page token and doing a post request to the /PAGE_ID Graph REST endpoint. So far, so good, but I'd like to tag the links with their authors as well. When I add the tags parameter to this request with a value of my user id (I am an admin of the page), this works fine. But when I enter another user id (even one that likes the app page), no tagging is done. Does anyone have any experience with this? Some blog post suggest this is not possible using the Graph API, even though this is possible when done manually.
Thanks!
If I understand correctly what you want to do, it is no longer possible with the new version of the Facebook's API (v.2.0).
Refer to this page for more informations.

Facebook Graph Api me/home Seems To Return Same as me/feed

I know there have already been a lot of questions asked about replicating the users home feed and using me/home, but my question is slightly different.
A few months ago I wrote code to authenticate with Facebook (get user access token) and then retrieve their home feed with me/home. This worked fine at the time as far as I can recall. I've just gone back to the code today, and it doesn't appear to work. The result I get back looks almost the same as me/feed, which is to say it is almost entirely posts from the same account and not posts from 'friends'. Just one post from someone else, a change to their profile pic, shows up but the rest are all 'self posts'.
This only happens with tokens for my own app. If I use graph explorer using the same token, I get the same result. If I use graph explorer with it's own token then it shows me something much more like the actual home feed on the Facebook site. Generating new tokens doesn't help. I have checked the permissions on the tokens used are the same, in fact I even copied the permission list from the generated graph token into my app and re-authenticated, but it didn't help. If my app does the request, then I get almost nothing from other people from me/home. This is the same if I use myuserid/home. Makes no difference.
So my question is, why? Have Facebook changed something and is there a way to change my app so it gets a better version of the home feed?
Secondly, while researching this I've discovered posts saying read_stream won't be granted by Facebook to any app on any platform that has an 'official facebook app'. Does this mean I'm out of luck anyway, even if I get this working for testing purposes using the account that owns the app, I won't actually be able to publish it so others can use it?
Thanks.

Mention Facebook Page in Page API Post

Apologies this is a duplicate post of - Facebook Graph Api - Posting to Fan Page as an Admin
The graph API states verbatim that (https://developers.facebook.com/docs/graph-api/reference/v2.1/page/feed/):
The main body of the post, otherwise called the status message. Either
link or message must be supplied. The message can contain mentions of
Facebook Pages using the following syntax:
#[page-id]
For example the following message would mention the Facebook
Developers page inline:
Test message #[19292868552] tag
If I post to a page (for which I am an admin) with the above syntax, using a page Id for the inline link (for which I am also an admin) and using a facebook application (for which I am a developer) this doesn't appear to work. An example of my call is:
https://graph.facebook.com/v2.1/page-id1/feed?message=Test+message+#[page-id2]+tag
In my case the tag is rendered as it appears above, i.e. no link or mention. So far I have tried:
Different combinations of page-id1 and page-id2.
HTML encoding the #, [ and ] symbols.
Posting as a page or as a user.
Using a different notation #[page-id:page-name]. This is not rendered atall, just becomes a blank space.
I must be missing something obvious if anyone is able to shed any light on this!
That's the documentation for API version 2.1, but your sample call there is unversioned and would thus be using the oldest supported version which is v1.0.
The v1.0 documentation doesn't say anything about that functionality, so it's likely only available in v2.1 or higher
The docs also say your usage of that feature needs to be approved before it can be used by the public, but i think using the correct version should get it working for you for test purposes, provided you're an admin of the App, the Page you're tagging and the Page you're updating
I was stuck on this for quite a while too. A clear answer was given by Igy on the Facebook bug tracker page...
To clarify, for testing this functionality before submitting it for approval you must be posting as a page you admin, tagging a page you admin, and using an app you admin - otherwise the tags are not applied
This is a great answer, but I misunderstood it at first. I was trying to #[page-id] a Facebook page with my test users page. I thought since I was logged into Facebook/developers as an admin with my personal facebook account that the test users I created counted as admin users too and I would be able to #[page-id] other pages they were admins of from their page.
It seems that you can only perform this functionality with the admin account you're signed into on facebook/developers. That account must have a Facebook page they admin, you must use the page access_token and #[page-id] a facebook page they admin from your users page in order for it to work. Once I got over the fact that I can not test this in my development environment with my test users It worked perfectly!
Hope this helps anyone else that might be haveing the same problem.