How to get user's pics who likes our post using restfb? - facebook-graph-api

I am trying to get the pic of a user who likes my post, i successfully get the names and id of a user who likes my post but i am not able to get this.
Is there any other method to get the pic of a user who like my post.
while using graph tool explorer i saw that the "pic" is the key to get a pics of user but when i try get by Likes.get(1).getpic(); it says getpic is undefined it means it doesn't have this kind of field, so is there any other method?

<img src='https://graph.facebook.com/ID/picture'/>
where ID is a id of user for whom you want to get picture and then simply request to above URL you will get image.

Related

A way to create the wall post when creating an album in a group with Facebook Graph API 2.10?

I used to do a POST /group-id/albums to create albums in a group. Then I would POST /album-id/comments to comment on the album. Then I would GET /group-id/feed?fields=comments, and find the id of my comment, and from that have the wall post id. You know, the post that says So and So added 3 photos to the album ...
Using the wall post id, I can delete the album, even though the Graph API does not allow deleting albums directly.
Starting today, the ability to post comments was removed through the API, except for page apps: https://developers.facebook.com/blog/post/2017/07/18/graph-api-v2.10/
Is there any way now, without commenting, to get the album story to the wall?
Here is a partial answer.
This parameter is not documented on the Group album, but it is on the User album. Set 'make_shared_album=true' in the post body. This will make a wall post for the creation of the album, and it looks like it shows up on your feed.
However, I cannot find a way to get that post_id. The post does not show up in the group's feed, oddly, though if you make a permalink to it, the permalink is part of the group. Sadly, the post_id is also not based on the album'd id, so there's no way to guess it.

How do I access my query when using Haystack/Elasticsearch?

I originally followed this tutorial (https://django-haystack.readthedocs.org/en/latest/tutorial.html), and have so far been able to highlight my query within my returned results. However, I want to highlight this same query when visiting the next page that I load with a separate template. Is there any way to save/access this query so that I can highlight the same results within this other template?
Whenever I try and include a statement like this, I get an error, which I'm thinking is because I'm not trying to access the query properly.
{% highlight section.body with query html_tag "span" css_class "highlighted" %}
You have to send to the next page, the information that you use to highlight the results in the first page. You can use the request.session to store the data and call it in the next page, or you can send the sqs by the url to the next page.
If you want to know how to manage the search query set, and how to edit that kind of stuff, I recommend you to read the views.py forms.py and the elasticsearch_backend in the haystack folder at: "/usr/local/lib/python2.7/dist-packages/haystack"
This is the url for the documentation of Django Session: Django Session
This is the url for the documentation to pass parameters trhough url: URL dispatcher

Getting a list of people who liked a URL with Facebook like button

I'm trying to find the list user ids who clicked on the liked a url address via Facebook Like button.
What I have found so far is that, I can use FQL to get the like information for a facebook object like this:
SELECT user_id FROM like WHERE object_id = 123
With this query I can find the user_id list who like and object. Therefore i need to find the object_id of the url using this query:
SELECT id FROM object_url WHERE url = 'http://localhost/facebook_page.html'
However when I put the returned id to the first query, no result is returned. I have also looked at the url_like table, however I cannot query url column as it's not indexed.
I have found from somewhere else that I have to add fb:admins tag, and force the administrator to like the link for an "open graph page node" to be created in the Graph. I tried that but it did not seemed to work. I don't know how I can check if the "page node" is created or not because I was not able to find any references at all.
user_like table does not work for me, as I cannot use the url column on the where clause.
http://developers.facebook.com/bugs/250668685029065
It seems like it's not possible for now.

Facebook: Change the description/title that appears in a facebook post when I post a URL

I am using a PHP script to post a URL to a fan page that I am an admin of, but the contents of the post always appear as defined by page's <title> tag/<meta type="description"> tag.
Can't the contents of facebook post be changed by using facebook's open graph description(og:description)/title(og:title) tags in the page being posted?
The title can be changed using og:title as long as the page has less than 50 likes (otherwise it is locked in by Facebook). The og:description can be changed at any time.
See: https://developers.facebook.com/docs/opengraph/

Pagination with a POST

I have a field where a user can search in. The user selects an option, then that is posted to a view and returns him with the Filtered results on a new page.
Im not sure how I would paginate this because the data this must be displayed is filtered by the previous post?
To paginate the first one is fine, cause tou have the post and know what to return to the page. But what about page 2 etc? then the post is gone?
Use hidden HTML input fields to keep track values posted from previous post