I have an fb app connected with my website. it will trigger a post to fb user's wall when he completes a search on my site. Is there anyway to have a limit on the number of posts to the wall? say 1 post per day or 3 posts per week?
Take a look at the Graph API documentation. Basically, Facebook will send you a Graph object for each of the users that log in. You can just keep a table in your DB that maps users to a counter for how many posts you've made to their wall, which you always check before posting to make sure it's not over the limit. When the time period is up, you can just reset the counter.
Here is some example code that will show how to access the Graph object: http://www.devshed.com/c/a/PHP/Facebook-PHP-API-Applications-Working-with-User-Data/
Related
Iam trying get the number of times each individual liked my particular post.
It seems that it is possible to get the overall like count of a page.
But I dont need the overall like count. I want in specific data of a user who liked my posts.
I tried these links
How can I get fan page likes count using graph api?
Getting the Facebook like/share count for a given URL
How to get Facebook likes count for a Facebook page?
I am just writing the answer which is mentioned in the comment. Because that's the answer.
No, that is not really possible. Each of your friends would have to
sign in to your app and grant it permission to read their likes, and
you would need to have valid individual user tokens available for all
of them each time you want to request this data, because “A User or
Page can only query their own likes. Other Users' or Pages' likes are
unavailable due to privacy concerns.”
developers.facebook.com/docs/graph-api/reference/v3.3/object/
When looking at Insights for a Facebook app page (for a mobile application, either via the app page or the Graph API), the Traffic -> Stream Publish page has a value called Story Clicks. From a recently published mobile app, I see 26 published stories, 2732 story impressions, but 0 story clicks. Does anyone know what the story clicks is tracking, or how it is defined?
Also on the same page, there is a graph for Likes and Comments, both of which are showing up as 0, although at least one person has commented and liked all of the posts that have been made so far. Why would the likes and comments be 0? (Note that the posts were either status updates with a location, a photo post or a video post, all done by the app via the Graph API).
First of all you must know that facebook insights are not updated in real time mode. So you must wait for some time to see the insights for particular time.
Story clicks are the clicks on your post from users who have seen your post. And 2732 view is not a big deal. The average CTR (Click through Rate) can very between 0,00015 to 0,001. So if your story is not very interesting it might not have any clicks if the one who clicked on your story was you.
Likes and comments are the comments made on your app posts. This section also doesn't update in real time so waiting for some time can bring everything to their places.
Here is some resource that can help you.
I am developing an app that processes <used_id>/posts connection to read the posts a user have made and count the likes and comments that have been received.
Yesterday I noticed that Instagram photo posts do not appear in posts connection. After a little search I found this Posts from Instagram not showing up on Facebook Open Graph API after which I was able to see Instagram photos in Feed connection if permission user_actions:instapp was added (or friends_actions:instapp for friend posts).
But two problems remain:
1) The posts still do not appear in Posts connection, which is more convenient for usage in my case because I am not interested in Posts of other users which may appear in Feed.
2) Even if I use Feed connection the posts do not have Likes field filled, does not matter whether I specify it directly or not. I assume that the same goes with Comments. Therefore in my case Feed is also useless because I need Likes data.
The only solution that works is by using <user_id>/instapp:take - there I get all photos also with Likes. So I might use it, but the trouble is - then I need to do double API call, because Instagram posts are not the only in which I am interested in (I still need to call <user_id>/posts).
I have submitted this bug report: http://developers.facebook.com/bugs/131821543664928
Perhaps someone has an idea for a better solution than calling instapp:take?
Thanks!
I am trying to have a hold of number of activity posts made by my application on Facebook.
However, Fb returns only 100 activity feeds at a time. So, if a user has lets say posted 200 times on FB. I would have to request twice. Similarly, I would need to do for all of his friends. This is very inconvenient ad inefficient. So, is there anyway to change the limit of number of feeds fetched at a time
Here is the feed sample from one of my users.
Thanks !
I have a facebook app that posts messages on user's wall. Is there a way for me to query all the posts created by all users using my app (for a certain time period)?
I don't want to query just the posts made by my app for a specific user but all the wall posts made by my application.
Thanks.
You can use the stream table. It has an app_id field.
Down side is it is limited to the last 30 days or last 50 posts.
http://developers.facebook.com/docs/reference/fql/stream/