How can i get the facebook post id?

a7madx7

How can i extract the post id after posting it using the Facebook method Post() or PostTaskAsync() ??

i am using JSON.Net like this

var postObject = await fb.PostTaskAsync("/me/feed", postArgs);               
dynamic result = JsonConvert.DeserializeObject((string)postObject);
string id = result.id;

but it doesn't work !

What is the appropriate way to do it using facebook c# sdk v 6.x?

Scott Selby

you don't need to deserialize the response to use it the way you want to just do this

dynamic postObject = await fb.PostTaskAsync("/me/feed", postArgs);    
string id = postObject.id;

I haven't used the PostTackAsync either, is it possible that postObject is not filled yet when you are trying to read it ? I would try just a regular Post fb.Post("/me/feed", postArgs) and see if that works.

if that doesn't solve it then you are going to have to set a break point and read the actual response. It is possible you don't have the right permissions and you are getting some type of error back. If this doesn't work for you - can you post the actual response that you are getting and it will be a lot easier to help

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How can i get the first three post_id in woocommerce?

From Dev

Get one facebook post by ID

From Dev

How can I get the time of a facebook user?

From Dev

how can I get facebook official page id of a page using graph api

From Dev

How can I get a user with a given facebook id using cloud code?

From Dev

How can I get the current Facebook user's public ID (not the scoped-id) or get the current user's profile photo

From Dev

How can I get the current Facebook user's public ID (not the scoped-id) or get the current user's profile photo

From Dev

How to get all post id's of a specific page in facebook

From Dev

Facebook PHP SDK: How can I post on page on behalf of page

From Dev

How do I can post a multiple photos via Facebook API

From Java

How can I get post id from my html form to views.py

From Dev

How can I get a post excerpt in Jekyll?

From Dev

How can I get post parameter in controller

From Dev

How can I get disabled inputs in Post

From Dev

How can I get disabled inputs in Post

From Dev

How to get facebook post permalink

From Dev

How can I reach a Facebook app by it's ID?

From Dev

Facebook API GET recent post ID

From Dev

How can get I a hardware ID in Qt

From Dev

How can I get the id in Extjs checkcolumn?

From Dev

How can I get a node by id in XML?

From Dev

How can I get the order ID in WooCommerce?

From Dev

How can I get the contact ID

From Dev

How Can I Get Parent ID in JQuery?

From Dev

How can I get the id in Extjs checkcolumn?

From Dev

How can I get the ID of the inserted record?

From Dev

How can I get a node by id in XML?

From Dev

How can get I a hardware ID in Qt

From Dev

How can i get id from url

Related Related

HotTag

Archive