Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround to Retrieve Facebook Username #91

Closed
xhezairbey opened this issue May 5, 2014 · 4 comments
Closed

Workaround to Retrieve Facebook Username #91

xhezairbey opened this issue May 5, 2014 · 4 comments

Comments

@xhezairbey
Copy link

Facebook Graph 2.0 lists username (along with locations, bio) field as deprecated.

But it's nice to have the username while we still can.

// grab username for user {$response->id}
$client->setBaseUrl('http://graph.facebook.com/' . $response->id);
$request = $client->get()->send();
$info = $request->json();
$username = $info['username'];

// one shot
$username = json_decode(file_get_contents('http://graph.facebook.com/'.$data->uid))->username
@philsturgeon
Copy link
Member

Is this a suggestion or a question?

If its a suggestion could you make it into a PR please? :)

@xhezairbey
Copy link
Author

It was a suggestion, and I can gladly send a PR shortly. :)

@philsturgeon
Copy link
Member

Awesome! Thank you. :)

@ramsey
Copy link
Contributor

ramsey commented Nov 28, 2014

This is covered by PR #98, so I'm closing this issue. @xhezairi, please take a look at my latest comment on the PR. Thanks!

@ramsey ramsey closed this as completed Nov 28, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants