How to get Facebook Post details?


Bill Software Engineer

Unfortunately, I can successfully query posts with this code, but the only information returned is created_time, message and id. How can I get other information like title, description, links and images?

FB.api(
    '/1494363804210145_10152988081617735', 
    function(response) {
        if (response && !response.error) {
            $("#postTitle").val(response.caption); // doesn't works
            $("#postMessage").val(response.message); // works
            $("#postDesc").val(response.description); // doesn't works
            $("#postLink").val(response.link); // doesn't works
            $("#postImage").val(response.picture); // doesn't works
            writeFeedback("Post is loaded.");
        }else{
            writeFeedback("Error Reading Post: "+response.error.message);
        }
    }
);
Toby

You have to pass specifically the fields to be returned from the Graph API. v2.4 introduced this feature.

Look

Declarative Fields
In an attempt to improve performance on mobile networks, Nodes and Edges in v2.4 require you to explicitly request the fields required for GET requests. For example, GET /v2.4/me/feed no longer contains likes and comments by default, but GET /v2.4/me/feed?fields=comments,likes will return data. See the documentation on how to request specific fields for more details.

Related


How to get Facebook Post details?

Bill Software Engineer Unfortunately, I can successfully query posts with this code, but the only information returned is created_time, message and id. How can I get other information like title, description, links and images? FB.api( '/1494363804210145_10

How to Get Facebook Post Permalinks

Sid Verma When fetching the list of posts using Facebook's Open Graph API, what we get is the post ID like XXXX_YYYY which can be converted to facebook.com/XXXX/posts/YYYY But these links don't work with Facebook embed plugin : https://developers.facebook.com/

How to get details of a specific post by user?

pixel mic I would like to get the details of a single post by the logged in user - specifically, the number of likes collected. Using the Javascript API, I have a valid app id and can log in the user and get their basic information. To get information about a

How to get Facebook/Google/Twitter details during OAuth in MVC?

Jeff Whitty I know this question has been asked a lot over the past 10 years, but I need a more modern answer than most I can find. I have an ASP.Net MVC project (C#) and have enabled Facebook and Google+ authentication following MS guidelines. It's very simpl

How to get Facebook/Google/Twitter details during OAuth in MVC?

Jeff Whitty I know this question has been asked a lot over the past 10 years, but I need a more modern answer than most I can find. I have an ASP.Net MVC project (C#) and have enabled Facebook and Google+ authentication following MS guidelines. It's very simpl

How to get Facebook/Google/Twitter details during OAuth in MVC?

Jeff Whitty I know this question has been asked a lot over the past 10 years, but I need a more modern answer than most I can find. I have an ASP.Net MVC project (C#) and have enabled Facebook and Google+ authentication following MS guidelines. It's very simpl

How to get Facebook/Google/Twitter details during OAuth in MVC?

Jeff Whitty I know this question has been asked a lot over the past 10 years, but I need a more modern answer than most I can find. I have an ASP.Net MVC project (C#) and have enabled Facebook and Google+ authentication following MS guidelines. It's very simpl

How to get Facebook/Google/Twitter details during OAuth in MVC?

Jeff Whitty I know this question has been asked a lot over the past 10 years, but I need a more modern answer than most I can find. I have an ASP.Net MVC project (C#) and have enabled Facebook and Google+ authentication following MS guidelines. It's very simpl

How to get Facebook/Google/Twitter details during OAuth in MVC?

Jeff Whitty I know this question has been asked a lot over the past 10 years, but I need a more modern answer than most I can find. I have an ASP.Net MVC project (C#) and have enabled Facebook and Google+ authentication following MS guidelines. It's very simpl

How do i get the facebook post id?

a7madx7 How to extract post id after posting post using Facebook method Post() or PostTaskAsync() ? I use JSON.Netsomething like this var postObject = await fb.PostTaskAsync("/me/feed", postArgs); dynamic result = JsonConvert.DeserializeObject((

How do i get the facebook post id?

a7madx7 How to extract post id after posting post using Facebook method Post() or PostTaskAsync() ? I use JSON.Netsomething like this var postObject = await fb.PostTaskAsync("/me/feed", postArgs); dynamic result = JsonConvert.DeserializeObject((

Get a Facebook post by ID

Kelly Then I want to get the post where I get the error: { "error": { "message": "Unsupported get request.", "type": "GraphMethodException", "code": 100 } } and request : https://graph.facebook.com/100002485262717_622325677860269?access_token=token&a

Get a Facebook post by ID

Kelly Then I want to get the post where I get the error: { "error": { "message": "Unsupported get request.", "type": "GraphMethodException", "code": 100 } } and request : https://graph.facebook.com/100002485262717_622325677860269?access_token=token&a

Get Facebook user details quickly and analytically

Mugunthan Balakrishnan I need to get facebook user info details when logging in a new user via parse. Currently, I am logging in a new user below. Can't seem to get user details. I've seen some code on target-c. Most functions no longer work The Facebook iOS S

Get Facebook user details quickly and analytically

Mugunthan Balakrishnan I need to get facebook user info details when logging in a new user via parse. Currently, I am logging in a new user below. Can't seem to get user details. I've seen some code on target-c. Most functions no longer work The Facebook iOS S

Programmatically get details of Facebook friends in Android

bottle opener I am new to android. I am creating an app that syncs facebook contacts with phone contacts. I am using facebook api 4.0. Now I don't know how to get the details of all my friends. I've tried user_friendsjust giving friends the details of using my

Get Facebook user details quickly and analytically

Mugunthan Balakrishnan I need to get facebook user info details when logging in a new user via parse. Currently, I am logging in a new user below. Can't seem to get user details. I've seen some code on target-c. Most functions no longer work The Facebook iOS S

Programmatically get details of Facebook friends in Android

bottle opener I am new to android. I am creating an app that syncs facebook contacts with phone contacts. I am using facebook api 4.0. Now I don't know how to get the details of all my friends. I've tried user_friendsjust giving friends the details of using my

How to get details of a tweet?

Andrew Berezovskyi When the user clicks , I need to show the tweet details (e.g. tweet ) <a href="https://twitter.com/screen_name/status/id"></a>, so I'm trying to use linq2twitter to get this ID: public static IEnumerable<TweetInfo> GetLatestTweets() {

How to get exception details

Obautista I have a WCF service in which a custom service error has been implemented. I am throwing an error based on a specific condition, so in the if statement I am throwing the error below. throw new FaultException<CustomServiceFault>( new CustomService

How to get exception details

Obautista I have a WCF service in which a custom service error has been implemented. I am throwing an error based on a specific condition, so in the if statement I am throwing the error below. throw new FaultException<CustomServiceFault>( new CustomService

How to get exception details

Obautista I have a WCF service in which a custom service error has been implemented. I am throwing an error based on a specific condition, so in the if statement I am throwing the error below. throw new FaultException<CustomServiceFault>( new CustomService

How to get details of a tweet?

Andrew Berezovskyi When the user clicks , I need to show the tweet details (e.g. tweet ) <a href="https://twitter.com/screen_name/status/id"></a>, so I'm trying to use linq2twitter to get this ID: public static IEnumerable<TweetInfo> GetLatestTweets() {

How to get exception details

Obautista I have a WCF service in which a custom service error has been implemented. I am throwing an error based on a specific condition, so in the if statement I am throwing the error below. throw new FaultException<CustomServiceFault>( new CustomService

Facebook API: How to get all data related to a post?

Crysis I'm trying to get all the data related to a specific post like comments, likes, views etc. in one API call. I can get likes {post-id}/likesand comments /{post-id}/comments. How can I get all these details in one API call? Toby try /{post_id}?fields=id,m

How to Get Post Notifications from Facebook Pages You Follow

bss I'm trying to make a python script that uses the Graph API to query for post notifications from the pages I'm following on Facebook. However, in the wake of the Cambridge Analytica scandal, Facebook appears to have imposed more restrictions on it, even if