It's possible to both query (GET) or create (POST) a post on a users timeline/feed. But as far as I can see, the documentation only lists the possible fields you get back when querying - not which of those fields it's possible to set when doing a POST.
Can anybody link to a complete list of fields that I can set during a POST to https://graph.facebook.com/arjun/feed
See the posts connection on the User object. Required is only message or link.
As found at http://developers.facebook.com/docs/reference/api/ under
Publishing section:
Method: /PROFILE_ID/feed
Description: Publish a new post on the given profile's feed/wall
Arguments: message, picture, link, name, caption, description, source, place, tags
example:
https://graph.facebook.com/arjun/feed/?access_token=HAGSX&message=Lorem%20Ipsum
Related
We have a Facebook Shop and a Business Page, and are using Facebook Graph API to create Photo posts on the Business Page using the Javascript SDK running in a browser. How do you include the tagged Product in the Create Photo request?
https://developers.facebook.com/docs/graph-api/reference/photo/ mentions a tags field you can pass which is described as "Tags on this photo", however it has a tag_uid "The user_id of the tagged person". Is this tags field how you are supposed to tag a product?
A similar question from 2017 was not answered and is so old I thought I'd post a new one: Publish new facebook post with tagged product
What we've tried so far
To get a list of our products, we can use GET ${businessId}/owned_product_catalogs to retrieve a list of catalogs, and then GET ${productCatId/products with a filter: '{"custom_label_0":{"eq":"something_to_match"}}' to get a specific product in the catalog. So now we have the ID of a product we want to tag e.g. "4378279312278116". (we happen to use custom_label_x fields meaningfully, of course the filter could have been something else but this works for us)
To create the photo post, we can POST /${account.id}/photos with a payload like:
{ caption: 'Test caption',
url: image_url,
access_token: account.access_token,
tags: [
{
tag_uid: "4378279312278116",
tag_text: 'Test tag',
x: 10, y: 10
}
]
}
This request completes OK and does post the photo, but nothing is tagged on it when we view it on our page.
Trying to read the photo with GET ${photo_id} only returns basic infomation fields created_time, id, name. I can't see how to read further fields on the photo object to check if the tags data was associated with it correctly.
Any advice please?
I have a DynamoDB table called Posts in my iOS project on AWS Mobile Services. I would like to add Favourites feature to my app, so user can add any post from Posts table to favourites. How can I implement it using DynamoDB with AWS Mobile Services? Thank you!
In NoSQL, the database model is mostly depends on the Query Access Pattern (QAP). I am not sure whether the Mobile front end shows the post and the users who likes it or user page which list their favorite posts.
Case 1 : Post page showing the users who liked the post
You can have a favourites attribute to POST table to have the list of users liked the post.
favourites - SET or LIST data type
Example:-
Post 1 is favorite for user 1 and user 2
post 1
favourites : ["user1", "user2" ...]
I am creating a FB app and I want to know if I can track precisely when (date/time to the second) a user "likes" the page.
According to the documentation:
GET /v2.1/{user-id}/likes/{page-id} HTTP/1.1
Host: graph.facebook.com
...
Reading this endpoint returns an array of Page objects with the following additional field:
Name Description
created_time A timestamp indicating when the page was liked by this person.
Is there a way to add user-data (a number or a string) and use it while querying posts from the stream of that page ?
Essentially I am trying to make posts with certain attributes on a Facebook page thru an App and would like to query the stream (newsfeed) on that page using FQL or Graph API and just select the specific posts based on the attributes added to the posts.
SELECT post_id FROM stream WHERE **user_data** ='tag-specified-with-post' app_id='APP_ID'.
Thanks for your help.
Use FQL to get posts from your app. This query will get posts made in the account of the user by the Photos app:
SELECT app_id, post_id, actor_id, target_id, message FROM stream WHERE filter_key ='owner' AND is_hidden = 0 AND app_id='YOUR_APP_ID'
Replace that app_id with yours. And replace filter_key with 'others' to get other people's posts that the user can view.
I am trying to get the url for specific post on friends page that I liked.
Post should be made by 3d user no friends page by these steps:
Put to message some url to facebook open page (e.g.
https://developers.facebook.com/tools/explorer/ )
Wait while url data is loaded to message
Remove only url from post, all loaded data should be presented!
Write some text, e.g. "message"
I liked that message on friend's wall.
I've got it's id using fql.query request
select id, type from object_url where id in (select object_id from like where user_id = <your_id>)
But when I select data by this id using graph api or fql.query, i can't get the url from these post! !