How I can input location parameter to post using fb graph api:
https://www.dropbox.com/s/ormr403s2dg4a6h/Facebook%202014-07-18%2014-20-38%202014-07-18%2014-21-04.jpg
We can enter special property place: 'location-id' to post object:
https://developers.facebook.com/docs/graph-api/reference/v2.0/post
Related
How do I mention a user in a post in the 2.8 version Graph API in Facebook Workplace?
https://graph.facebook.com/{group_id}/feed
params: message=test
Use:
https://graph.facebook.com/{group_id}/feed
Parameters: message=test and tag=userid of the person you want to tag.
i'm currently using the following api of FB Login integration in my Mobile Website : FB.api('/me', function(response){...} . In the resposnse i am only getting an id field and a name field. Is there any way where i can retrieve the actual email of the user who logs on to the site using FB Login pop up.
I read in the documentations about another URL /{id} , but it also returns only id and name.
Please suggest
To get the email of a user, you have to autorize the user with the email permission, and you have to add the field parameter to the API call:
FB.api('/me?fields=name,email', function(response){...}
or:
FB.api('/me', {fields: 'name,email'}, function(response){...}
Check out the changelog, about "Declarative Fields": https://developers.facebook.com/docs/apps/changelog#v2_4
I have already managed to get all the basic information from the user but I have no idea how to retrieve his/her profile picture.
me = facebook.get('/me?fields=id,name,first_name,last_name,age_range,link,gender,locale,timezone,updated_time,verified,friends,email')
Can you please provide some hints? I am using Python Flask and OAuth.
Try adding 'picture' to your list of parameters
With OAtuh and Facebook Graph you can use this, like you see this code is C# based, but you just need to check the requests URL's:
request = WebRequest.Create("https://graph.facebook.com/v2.3/me/picture?access_token=" + Uri.EscapeDataString(authorization.AccessToken));
using (var response = request.GetResponse())
{
myImageBoxOrSomethingThatAcceptUrl.PictureUrl = response.ResponseUri.AbsoluteUri;
}
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
Trying to create a wall post with photo attached. Photo is a Facebook-hosted photo within some album.
Problem here - Facebook won't allow including facebook-hosted content in posts ((#100) FBCDN image is not allowed in stream )
From the Web UI, it's possible to "Share" a photo on my wall - that's almost what i need but i don't know the Graph API equivalent for that operation (if there's any)
Any help appreciated.
The answer is "me/links"
passing http://www.facebook.com/photo.php?fbid=** as a link
With the Graph API you can share the photo as a link.
this is the documentation:
https://developers.facebook.com/docs/reference/api/user/#links
You need send a POST request to me/feed/. And indeed send the link: http://www.facebook.com/photo.php?fbid=[the id of the photo]
Make sure the publish_stream permission is allowed for the access_token.
with Jquery this is an example:
$.post(
'http://www.facebook.com/me/feed',
{
link: 'http://www.facebook.com/photo.php?fbid=[THE_PHOTO_ID],
access_token: [YOUR_ACCESS_TOKEN]
},
function(result) { console.log('shared'); },
'text'
);