PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, June 29, 2022

[FIXED] How to get complete information about post using facebook sdk C#

 June 29, 2022     facebook-graph-api, facebook-javascript-sdk, facebook-sdk-4.0     No comments   

Issue

When I use postman application or Graph API explorer then i get complete information or all fields of posts as explained in https://developers.facebook.com/docs/graph-api/reference/v2.0/post

enter image description here

I have not use fields attribute in above image even then it is showing all fields so i am looking for the answer to pass field attribute in query string.

But when i use SDK i get only 3 fields created_time, id and message, please refer following image:

enter image description here

Kindly tell how to get all fields of the posts using facebook sdk c#?


Solution

You need to specify the fields parameter, it´s called "Declarative Fields" and came with v2.4 of the Graph API: /me/posts?fields=field1,field2,field3,...

The possible fields can be found in the docs, you should use the latest version though: https://developers.facebook.com/docs/graph-api/reference/v2.7/post

Make sure you are using a newer Version of the API, you are trying to use v1.0 in Postman (which does not exist anymore).



Answered By - andyrandy
Answer Checked By - Marilyn (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home
View mobile version

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing