I am facing problem in getting Facebook data
I am using Facebook SDK for page status read, for this I am using the following URL :
https://graph.facebook.com/gennextapps/statuses?limit=50&access_token=" + access_token
At first I am getting values, but, after two times I am unable to get the values.
Is there any difference between statuses and feed in URL?
The statuses and feed are two different things. "Statuses" are only the items posted by the page, while "feed" includes items posted by others.
I found this page documentation
Statuses: An array of Status message objects. The Page's status updates.
Feed: An Array of Post objects containing (up to) the last 25 posts. The page's wall.
Related
I got a problem of getting the number of view of page posts.
"GET /v2.8/{page_id}/feed" could give me the list of page posts.
But I also want the number of views of each posts.
Trying "GET /v2.8/{page_id}/insights/post_impressions,post_consumptions_unique"
but the return is empty set.
Am I missing some param?
[from comments] But can I get the view count together with the post list, so I do not have to ask the view count for every post in the list?
Insights are available via the post object, too, so you can use field expansion to get the data in one request:
/{page-id}/feed?fields=message,insights.metric(post_impressions,post_consumptions_unique)
So I am currently making an app to work with and learn more about JSON (using GSON) and decided to go with a reddit browsing app. I am currently able to get the JSON data by using "http://www.reddit.com/.json" and this will get me the JSON for the first 25 posts. I am trying to get the information for the next posts by using
"http://www.reddit.com/.json?count=25&after=" + name_of_last_post
which name_of_last_post is the name field from my GSON for the last post. This however just brings up the first page's posts again with their numbering starting at 25, I get that the numbering starts at 25 because count is set to 25. What I am asking is what is the format of the string I can create to get that next set of JSON items. you can try this your self by going to reddit.com/.json and taking that into a json editor and formatting it nicely than going to the next page of reddit and adding .json before the ?count=25&after=, you will see that the text following after= does not seem to appear on the first JSON file anywhere. If there are any parts of this question that are still unclear please leave a comment and I will check in on it later. Thanks and have a great day.
There are a couple of fields that you can use in order to fetch the next page on JSON.
You could either retrieve the 'name' of the last post, or instead of parsing the whole block, you can retrieve the last couple of fields from the JSON that reddit gives you. There are a couple of fields that you can easily use to navigate pages forwards and backwards, they're conveniently called 'after' and 'before'
Having that value, you can mount your URL with it, which in this case is http://www.reddit.com/.json?count=25&after=t3_3gi42o
This will get you a new JSON, with different 'after' and 'before' fields, pictured below:
In my application, I am displaying google.maps.places.Autocomplete view integrated in an html page in a webview. While typing on it, I am getting only 5 dropdown results. How can I increase the search results? Anyone please help..
From the documentation:
A JSON response contains two root elements:
"status" contains metadata on the request. See Status Codes below.
"predictions" contains an array of places, with information about the
place. The Places API returns up to 5 results.
Source: https://developers.google.com/maps/documentation/places/web-service/autocomplete#place_autocomplete_responses
I'm using Graph API in my android app to get posts of a facebook page.The result is JSONObject.
Posts are of 3 types - status, link, photo
For a post of type photo contains a picture which is available in the page album.
I'm loading this image from the picture field(typically a web URL) in the response json object. However the image is of poor quality.
To get the original picture, I should get it from the album/photos of the page.
Problem: The problem in the second case is, How do I get the id for that picture from the post? to query it from the album.
The id is in the field object_id in the json.
You have to make an additional call with this ID then.
I try get information about own groups over Graph API.
On me/groups I get list of groups. But I not understood what is params: bookmark_order.
Also we can see param unread:1. If I right, it present if another user set some change in group (post new comment). If I refresh group page in browser or open in native android app, then unread is no longer appears. After which api request I can remove unread flag?
Also at group's wall I can ask question. But {group_id}/feed not contain this posts. How I can get it?
I have group document. I can get data about this document: subject, message. But if in document I insert image, then in message param I has string about this image: (img:301666969868743). How can I get this image? Simple GET-request with 301666969868743 (I assumed that this long decimal is ID) return false.
bookmark_order (see https://developers.facebook.com/docs/reference/api/user/)
An array of objects containing the version(old-0 or new Group-1),
name, id, administrator (if user is the administrator of the Group)
and bookmark_order(at what place in the list of group bookmarks on the
homepage, the group shows up for the user).
unread
Doesn't appear to be documented. I would presume this would be a read-only value that facebook controls.
Log a documentation bug with facebook and ask them to explain it. (https://developers.facebook.com/bugs?search_view=search&search_ids%5B0%5D=208685622513742)
question not appearing in {group_id}/feed
Tested it and you're right, it doesn't appear. Good find. You should log this as a bug with facebook.
(https://developers.facebook.com/bugs)
Group document with image
When I did an image in a document, I too got the cryptic (img:###) inside the message of the returned object from {group_id}/docs. However I was able to find it on the graph using https://graph.facebook.com/####?access_token=#### and it returned the results. So I'm not sure how to help you with this one