w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
Facebook - Send friend request (User to User) using graph API and PHP SDK?
You can use the Friends Dialog. To integrate you can use javascript as- FB.ui({ method: 'friends', id: USER_ID }, function(response){}); OR, a URL redirect as- https://www.facebook.com/dialog/friends/? id=USER_ID &app_id=APP_ID &redirect_uri=REDIRECT_URI For more details: Friends Dialog

Categories : PHP

How to get Facebook friend's Anniversary date using graph Api
If you mean marriage anniversary- There's no such api that can fetch this for you. If you mean birthday anniversary- You can fetch with - /ID?fields=birthday with permission: user_birthday

Categories : Android

Why is facebook api asking this message on login with facebook for authorised users - "Application name" would like to access your friend list.?
The Facebook app authorization screen says that the app would like to access your friend’s list. But in truth, the app probably didn’t ask for that. The friends list is part of every app authorization, whether the app wants it or not. This is because Facebook wants apps to add social context, which can only be done with the friends list. But this doesn’t give the app the ability to contact your friends on your behalf, at least not more than it could do so without you adding the app anyway. Check for an reference https://www.facebook.com/about/privacy/your-info-on-other#applications

Categories : Facebook

Facebook FQL - get all photos which user and user's friend commented, liked
For photo liked: select object_id from like where object_type=photo AND user_id = {user_id} For comments, this should work but it doesn't seems select post_id from stream where type=46 AND source_id={user_id}

Categories : Facebook

Can i get facebook friend list without login on facebook
I believe you cannot get any data without access token and to get access token you need to login. Therefore, you still need to login. In short, it is not possible. This is from Access Tokens - Facebook Developer An access token is a random string that identifies a User, App or Page session and provides information about granted permissions. Access tokens are obtained via a number of methods, each of which are covered later in this document. The token also includes information about when the token will expire and which app generated the token. Because of privacy checks, the majority of API calls on Facebook need to include an access token. There are different types of access tokens to support these various cases: User Access Token – This kind of access token i

Categories : PHP

Facebook Graph API - access_token=app_id|app_secret - search Graph API without user login
According to Facebook The following changes will go into effect on July 10, 2013: ..... Graph API search changes App access tokens will be required for all search Graph API calls except Places and Pages. Search for application will no longer be supported.

Categories : C#

sending notifications to user's friend in facebook using js sdk
the problem was that its not the normal access token, here the access token will be a combination of your app id and app secret separated by "|" symbol. also you need to send the data as an array and not as a json object. So here is what the working code looks like. function makePost(personid){ var address = "https://graph.facebook.com/" + personid + "/notifications"; var tempdata = {}; tempdata['access_token'] = appId + "|" + appSecret; tempdata['href'] = ""; tempdata['template'] = "You have earned 5 credits, Click here to redeem"; jQuery.post(address, tempdata , function(data){ console.log(data); }); } PS: I am using Jquery Library to make the post request, So dont forget to include jquery.

Categories : Javascript

How to find out if a user's facebook friend has joined my app?
Instead of fetching the users friends and comparing them to the users in your database, simply use this API call: /{user_id}/friends?fields=installed Of course you can add other fields to this list to get more data of the friends.

Categories : Ruby On Rails

FQL friend table return a lot of stranger name - "Facebook User"
this seems to be a bug, I filed it for you at https://developers.facebook.com/bugs/555447487827125 you can subscribe to follow it.

Categories : Facebook

Facebook friend list fetching
oFor the logout, you can use FB.logout(function(response) { //console.log(response); // do something usefull ... }); and put that on a button. BUT: you are currently logging off the user from Facebook AND from your app, users might find that strange?

Categories : Facebook

Fetch facebook user public data, which available without loggining througth Facebook Graph API if any exists
This isn't possible unless you have an access token. The public graph doesn't reflect the browser information it reflects what is given in the documentation https://developers.facebook.com/docs/reference/api/user/

Categories : Java

Retrieve zip code of a facebook user by facebook graph API
If you check the documentation for the /me call at https://developers.facebook.com/docs/reference/api/user/ you'll note that there is no reference to the user's zip or postal code. I'd recommend you use ask for the user_location permission and then call /me?fields=location and try to derive the zip code from the information contained therein - this answer http://stackoverflow.com/a/7129344/2091159 - has some information about doing so.

Categories : PHP

facebook started requesting that our users all us to "access friend list"
It's an issue with Facebook and will be resolved soon. See this link to read more about it. Also, I asked a similar question on meta - http://meta.stackexchange.com/questions/194086/why-does-stack-exchange-want-to-access-my-facebook-friends-list

Categories : Facebook

Generating list of facebook friends using Facebook's Graph API
First of all you need to add proper permission to access education history of user & user's friends, which you can achieved by doing this but remember user_education_history is to access User education while friends_education_history is for User's friends education history: $params = array( 'scope' => 'user_education_history, friends_education_history, user_location, email'); $loginUrl = $facebook->getLoginUrl($params); And to access education field you have to modify one line from your code like this: $user_profile = $facebook->api('/me?fields=name,education,email','GET'); You can use below code to just print your $user_profile and then parse it according to your requirements: <pre><?php print_r($user_profile); ?></pre> Probably its too late answer f

Categories : PHP

Why I am request email scope for oauth, Facebook also show I need to access friend list?
With reference to : Permissions- Basic Info (Default)- Basic info is part of every request for permissions. It includes several elements from a person's public profile and a list of their friends. A person's public profile refers to the following properties on the user object by default: id name first_name last_name link username gender locale age_range Other public information The friend list is the friend list node on the user object.

Categories : Facebook

OAuthWebSecurity Facebook ominous message: app "would like to access your public profile, friend list and email address"
Those are the very basic permissions that a user grants you by just logging in to your app - has always been that way, FB have just updated the message shown to the user to make it more clear what they actually share. You can not ask for "less" permissions.

Categories : Facebook

Unable to get a long term access token using facebook graph api
You can not get the long-lived user token using Graph API Explorer. You have to make a GET request to- https://graph.facebook.com/oauth/access_token? grant_type=fb_exchange_token& client_id={app-id}& client_secret={app-secret}& fb_exchange_token={short-lived-token} You can check the same in the browser. and if you need the page access token, you can have a never expiring token. Check out this answer- Check out the accepted answer here: What are the Steps to getting a Long Lasting Token For Posting To a Facebook Fan Page from a Server

Categories : Facebook

get facebook graph user from Respone
According to the documentation, you can use http request on https://graph.facebook.com/me?fields=id&access_token=replace-this-by-your-access-token to get the id of the logged in user

Categories : Android

How to get friend of friend details from facebook iOS SDK?
After Authorization stuff ... Try this request .. [facebook requestWithGraphPath:@"[friend_id]/friends" andDelegate:self]; You will get the friends of any friend ..

Categories : Iphone

Check if user has liked a post or not with Facebook Graph API
Here are solutions to a couple of your problems: Problem: is that when ever i run this code,it shows only one post from newsfeed.but if i remove the following code from the code,it will fetch 20 posts from newsfeed. I don't know whats happening. $ret = $facebook->api(array( 'method' => 'fql.query', 'query' => "SELECT like_info FROM $type WHERE object_id=$object_id" )); $checklike = $ret['data']['like_info']['user_likes']; Answer: Above code is filtering your contents, here you are checking whether your each of the 20 posts (which you are pulling) and looping individually and checking if it is a status, photo, video, link, etc is liked by the logged in user or not? Above query works only for type = Photo,type = Link, as far as I remember only Photos, Links have like_info obje

Categories : PHP

Facebook Graph API to search user statuses
You'll have to manually go through the statuses returned from /me/statuses to find the ones that you care about. Facebook doesn't really let you use their computing power to search stuff like that.

Categories : Facebook

Facebook graph api: How to get last edit time of user name
Late to the topic, but I noticed that when the User is viewed as a Map (via the Android API), there is an attribute called updated_time. Here's a snippet that demonstrates: Request.newMeRequest(session, new Request.GraphUserCallback() { @Override public void onCompleted(final GraphUser user, final Response response) { for (final Map.Entry<String, Object> entry : user.asMap().entrySet()) { logger.debug("User {}: {}", entry.getKey(), entry.getValue()); } } }).executeAsync(); Which yields (among other attributes): 08-25 17:58:08.531: D/AbstractActivity(21850): User updated_time: 2012-05-25T11:46:32+0000

Categories : Facebook

Get facebook friends from open graph user
I think I figured it out. If you use a request, you can find a list of the users friends using the current session. The code I use is Request.executeMyFriendsRequestAsync(Session.getOpenSession(), new GraphUserListCallback() { @Override public void onCompleted(List<GraphUser> users, Response response) { // TODO } });

Categories : Android

my script is showing add as friend even user is my friend
I think you must check for the accepted column value rather than checking for the number of rows returned <?php $addFriend = ""; $querToCheck = mysql_query("SELECT * FROM friends WHERE (user_one = '$activeID' AND user_two = '$fid') OR (user_one = '$fid' AND user_two = '$activeID' ) "); if(mysql_num_rows($querToCheck) > 0) { $row = mysql_fetch_array($querToCheck); $accepted = $row['accepted']; if($accepted == 1) { $addFriend = "Waiting For Approval"; } else if($accepted == 2) { $addFriend = "Friends"; } } else { $addFriend = '<a href="addAsFriend.php?sid='.$row['id'].'" style="color:#FFFFFF;font-size:14px;">Add As Friend</a>'; } ?>

Categories : PHP

How to represent friend relation when friend is also an user
The scheme that you are trying to set up looks very much like a self-referencing many-to-many scheme: There is no separate Friend entity, only a "friendship link" table called UserFriend. It has two attributes - the ID for the user entity representing a friend, and the ID of the user whose friend it is. "Friendship" may also contain additional attributes, such as the date when friendship has been established, the context in which the friendship exists (college, work, family) and so on.

Categories : Database

Is there a way to fetch all posts in a user's facebook wall through graph api?
You can instead use FQL instead of Graph API for your case. You can query the stream table to retrieve the status created between certain dates. For example to retrieve status updates between 21th June and 28th June you can create FQL like SELECT post_id,message,actor_id, attachment, description FROM stream WHERE created_time > 1371790800 and created_time < 1372442741 and source_id = me() and actor_id = me()

Categories : Facebook

How to get a Facebook user's current location using Graph API in JavaScript SDK?
You can use same as PHP Facebook SDK: // PHP $user_location = $facebook->api('/me?fields=location'); // Java Script FB.api('/me?fields=location', function(response) { console.log(response); });

Categories : Facebook

How to get facebook group name list using graph API
On the screenshot where you see Get Access Token click . Under the user data permission category check user_groups then you will get the data.

Categories : Android

iOS - Facebook Open Graph Api -- ensuring that photos are user generated
You should be able to replace your code: if (photoURL) { NSMutableDictionary *image = [[NSMutableDictionary alloc] init]; [image setObject:photoURL forKey:@"url"]; NSMutableArray *images = [[NSMutableArray alloc] init]; [images addObject:image]; action.image = images; } with: if (photoURL) { NSMutableDictionary *image = [[NSMutableDictionary alloc] init]; [image setObject:photoURL forKey:@"url"]; [image setObject:@"true" forKey:@"user_generated"]; // <======= ***add this line*** NSMutableArray *images = [[NSMutableArray alloc] init]; [images addObject:image]; action.image = images; }

Categories : IOS

Facebook graph API obtain a specific users's pictures from that same user
Not possible with the Graph API, but you can use FQL, to query for the photos of the user (not those in which he's tagged in) - SELECT pid,src FROM photo WHERE owner = me() Check FQL - Photo to include the required fields in the result.

Categories : Facebook

Getting 'pic-square' from user posts on the news feed using Facebook Graph API
Well after a lot of research and trial and error with FQL I figured it out. It's a series of nested queries and it returns an array with the urls of the pic-square images of the users whose posts appear in your news feed. The FQL query looks like this: SELECT pic_square FROM user WHERE uid IN (SELECT actor_id FROM stream WHERE filter_key IN (SELECT filter_key FROM stream_filter WHERE uid=me())) I was not able to differentiate between user and page profile pics.

Categories : Facebook

How to get/use User access token for Facebook Open Graph (as a cron job)?
Extending the user's access token You can exchange the user's access token with the long-lived access token (2-months) validity. Go though the link to get the long-lived token. But then you have to refresh the token after 60 days by the same login process. Extending tokens Extending the page's access token As an alternative, you can have a never expiring token for your fan page, that will solve your problem too I guess. To get this token- Make the following call using the long-lived user's access token - $facebook->api("/PAGE_ID?fields=access_token"); (You can use Facebook's Debug Tool to check the validity of the token)

Categories : PHP

Facebook: How to get list of last friends checkins using graph API or FQL
You can try use checkin api by FQL. I see only one way: use multi query in one request: 1) select post_id from checkin table from your friends (author_uid) order by timestamp (desc) 2) select page_id from location_post table, where posts from query (1) 3) get pages info from table page where page_id is set from (2) As result, you get last checkins, but issue: this checkins don't grouped by friends. For example, you can get last (by date) checkins, that have one user.

Categories : Facebook

Facebook Graph API - Get list of id's and names that have liked a post
There could be 2 reasons- You access token is not correct. You need the read_stream permission for getting the posts. You are not parsing the resulted JSON correctly.

Categories : Facebook

Facebook graph api, tell "comment" from "like" in the "post" list
I ran the following in facebook's graph api: /?posts.fields(id,message,story) which provides the same result as: / Note that I used a post id, not a page id. On a page id, you'll see the likes for the page while a post id will show the people who liked a post. The output clearly shows who commented and who liked. If you want to get a number for the count of people who have liked the post, check out Getting from Facebook API total number of likes per post.

Categories : Facebook

Reading Facebook's Public Posts and User Profiles using Graph API in RestFB ?
Try read the documentation about tokens, you have four types of tokens. See what suits best for you. User Access Token – The user token is the most commonly used type of token. This kind of access token is needed any time the app calls an API to read, modify or write a specific person's Facebook data on their behalf. User access tokens are generally obtained via a login dialog and require a person to permit your app to obtain one. App Access Token – This kind of access token is needed to modify and read the app settings. It can also be used to publish Open Graph actions. It is generated using a pre-agreed secret between the app and Facebook and is then used during calls that change app-wide settings. You obtain an app access token via a server-to-server call.

Categories : Facebook

Using Facebook Graph API, how can I print a user's full name in a standalone ruby code?
Impossible with That Data want an authentication for access it. such as email, likes, bio and so on But If you access 'public user's profile' You can connect "http://graph.facebook.com/username" to access it.

Categories : Ruby

Locations Connections of Facebook Graph Api User object not responding properly in ios-sdk?
Seems like that function doesn't consider the parameters as a part of the path. You can use this: - (FBRequest*)requestWithGraphPath:(NSString *)graphPath andParams:(NSMutableDictionary *)params andDelegate:(id <FBRequestDelegate>)delegate; source: https://developers.facebook.com/docs/reference/iossdk/request/ where params will be: NSMutableDictionary *dict = [[NSMutableDictionary alloc] init]; [dict setObject:@"locations" forKey:@"fields"];

Categories : IOS

iOS - Facebook Open Graph API -- Getting captions to show up next to user generated images
It's not a caption, it's a user message. You need to set the message in your code and in settings as a field as described in https://developers.facebook.com/docs/opengraph/using-actions/ Allows users to write a personalized message attached to this action. You can only use this when the text is entered by the user and not pre-populated. You can mention users and pages inline using mention tagging. Furthermore, in iOS code (objective-c) from this tutorial https://developers.facebook.com/docs/tutorials/ios-sdk-tutorial/publish-open-graph-story/: In this method: - (void)postOpenGraphActionWithPhotoURL setting this property: action.message = @"your message here"; gives the desired result.

Categories : IOS

Why my Facebook app asks asks if I'd like to access their friend list?
The friend list is part of basic permissions. You can read the list of friends via /userid/friends and this list is different than the extended permission read_friendlists, which are the list you created and added your friends to those (e.g. University, StackOverflow, my company...). That's why Facebook automatically ask for it even if you do not specify those extra permissions in your Facebook App settings or in your query (scope query string). You can find more information here and here.

Categories : Javascript



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.