Facebook Graph API pull a Posts basic data like Instagram Basic API - facebook

We are developing a mobile app that if share a FB post link to it, like you can share on WhatsApp, we want to be able to read the title or summary or start of that FB post, and redirect our App to the corresponding area.
So it works on Instagram using: https://developers.facebook.com/docs/instagram-basic-display-api/
Where give the post ID and it pulls in the caption text etc.
So works for IG and some other socials for anonymous users.
But for FB links, it mostly shows us the login page, in most cases (sometimes it worked on localhost maybe if logged-in - but could not recreate on server environments).
So cannot pull in any info about the post have shared using a direct FB share URL or maybe via some method on FB Graph Api, we could not see an easy way.
Does anyone know a generic method that anyone sharing a post to an app, or even just being able to see the title or summary of a FB post using the default share link, so we can direct our App to the right page.
So essentially using a FB post share link, we want to be able to read some basic data of that Post, whether logged in or not,
and happy to do this via Graph API or FB App or any other ways.
Again in summary - need to Get some user defined parameters or text or ideally hashtags from the post just using the share link of any FB Post/Page.
Any ideas or help appreciated.

Related

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.

Share existing post to Facebook app by id/url using Graph API

So in my app I display some Facebook posts from a predefined page. I get the posts from my server (the server gets them from Facebook directly) and this way I avoid using the Facebook SDK.
For each post, I have both the id and the URL and whenever a user presses on a post I open the Facebook app on that given post.
Now I'd like to add the possibility for users to share these posts to their profile pages, but when a user opens a post (on the Facebook app) it doesn't appear any option to share it (only like and comment). Other option would be to use the standard android sharing feature (ACTION_SEND), but whenever I share a post's URL this way the app only shares a picture from that post, not the actual post.
Any help would be much appreciated,
Regards
There is currently no way to mimic the "share" behavior that exists on the facebook.com website using graph API. The closest thing would be to use the link field that you mentioned.

Facebook: Share story without adding link to resource

I would like to make users to be able to post stories to their timeline but with no links to any resources. Using Facebook example:
I would like this post not to have any links. If someone using facebook on a browser clicks the image or the Cookie! title, they will be redirected somewhere. In my case, they are directed to an URL on my api which stores object data as meta tags from where FB scrappes the information (in this case, a blank page where the headers describe the Cookie! object). Is this even possible? I am developing an app for ios with no website, this is why I need to do this.

Posting to a Facebook page on behalf of page using a Facebook application by anyone

I have a web page linked to a Facebook application where users can log in by their Facebook account.
I have also a Facebook page for my application where anybody can post.
What I'd like to achieve is the following:
- An ordinary user logs in to my web page using her Facebook account,
- She adds an information to my web page (for example a book name),
- That information is instantly posted to my application Facebook page under page's name (for example "this book is read by someone").
I don't want it to be posted by the user, I don't want it to be posted by myself (admin of the page).
I don't want to mention about the user, it will be anonymous information.
But I couldn't find a way to do it either as JS or PHP.
Any suggestion is welcome.
Many thanks.
You will need to get a page access token. https://developers.facebook.com/docs/facebook-login/access-tokens/
Get it, store it somewhere on your server – and then use it when making the API call to post what the user entered.

Which app do I need to display facebook feed?

I need to display the "wall posts" from Facebook page to another website's social media wall.
The problem is that I never used neither Facebook nor any other social networks and got no clues on how do they work. That's why I'm pretty confused with API and it's terms.
The API docs say that I need a pageId for the page I'd like to display and appId and appSecret to get an access token to the feed.
I understand how to get the token and how to parse the results - but what kind of Application do I need for that? Should I create a facebook profile and make an application that would generate me these app codes? Or ask a page's owner to do it?
I spent quite a time googling but it must be something too obvious to write about it in docs? Help please?
The administrator of the facebook page is the only one that has access to the posts on the page wall.
For the APP:
The application can be created in any facebook verified account - go to: https://developers.facebook.com/apps and create the new app - this will give you the app id and secret.
Use the Facebook SDK that you feel most comfortable with to develop the app.
For the wall posts: There are several Graph API requests for wall posts in the form of:
https://graph.facebook.com/[pageid]/[call] where [call] can be posts, statuses, feed, home. See http://facebook.stackoverflow.com/questions/6214535/what-is-the-difference-between-feed-posts-and-statuses-in-facebook-graph-api for details about each.
Using an access token (that you said you already know how to get) the administrator of the page will be able to call the above URLs and get the wall posts.
For the part with posting the info on another social media website you have to specify the exact environment where you want the wall posts to end up.