i'm writing something like forum for my fans page, i want to use user's profile username & photo of each message post by user. i'm finding a way to access user's profile name & photo.
Anyone knows how to do it? thanks
The Apps on Facebook.com page should tell you everything you need to know to get started.
Related
I have been using Factual Places & Crosswalk API to get Social Media links on some specific places on my iOS app. The API returns proper links for Facebook & Twitter. But for Instagram it just return an id, something like this 79471948.
I was wondering how I can make use of this id. I thought I could use it in a URL, something like this. http://instagram.com/79471948, But this does not exists.
Then I thought the id could be a user-id. If it is a user-id I wanna get the username of the corresponding user-id so that I open his profile page something like this http://instagram.com/79471948. But as we know that Instagram does not allow us to directly request for User Data without OAuth we can't get access token. Without getting access token, I cant get the username.
So do you guys have any suggestions? So the whole thing is, I have this id 79471948 and I wanna open up the corresponding profile without doing any OAuth.
Thanks in Advance.
You have to use API to get the user profile from user-id.
https://api.instagram.com/v1/users/{user-id}/media/recent/?access_token=ACCESS-TOKEN
https://www.picodash.com/# allows you to search for a user-id and view the full profile or open actual instagram.com/username link and view.
I am building a web app that will retrieve basic Facebook user information, among them also the profile photo, via
https://graph.facebook.com/USERNAME/picture?width=100&height=100
I plan on storing that variable in my database so that I can display the profile photos in the web app.
Now, I'm wondering what happens when someone changes their Facebook username from "jimmysmith" to "jamesdoe", for example? I assume that my saved URL of
https://graph.facebook.com/JIMMYSMITH/picture?width=100&height=100
will stop working? Is there any way around this?
Or will it still work because Facebook redirects the old username to the new username, maybe? I found no evidence of that, however. I have no way of testing it, either.
The way I retrieve it via FQL is:
$fql = "select uid, name, email, birthday from user wher.... etc.
Use the user IDs instead.
Usernames will not be query-able in v2.0 API.
See https://developers.facebook.com/docs/apps/upgrading for more information.
I am doing some research into the capacity of Facebook Connect. I have some questions on how a couple of bits of functionality.
Is it possible to fetch a list of all friends of a user?
The idea of this is that a user would log in using my site and then they could search through their friends and select one, and the site would get that friends users id and store it to the sites database.
Getting a photos from that user
After getting the friends user id, would it then be possible to get their photos? Or would the friend need to give the site permission to do that?
I am looking into a site where you can buy a greetings card for a friend, and i wanted to know whether my users would be able to login via facebook, pick a friend, get a photo and then at the time of their birthday it would send them a private message (which i think i know how to do) linking them back to my site where they could view the birthday card and their photo.
Thanks
To answer your questions:
Yes. Once you have an access token from the login process for a user, make a Graph API request to https://graph.facebook.com/me/friends. You can test this for yourself here: https://developers.facebook.com/tools/explorer?method=GET&path=me%2Ffriends
Yes. During the login process, you must request user_photos and friends_photos permissions after which you can use the access token for a Graph API request to https://graph.facebook.com/USERID/photos. This will only return those photos for a friend which the user is allowed to see for the current privacy settings.
Some FB users have not uploaded a profile photo. When they authenticate to my app I don't want to store these default FB photos like so:
https://fbcdn-profile-a.akamaihd.net/static-ak/rsrc.php/v1/yp/r/yDnr5YfbJCH.gif
Is there an API call I can use to determine if the user has uploaded a custom photo?
Thanks
No.
Don't know what else to tell you :)
The only way I could think of doing it would be to pull the user's albums and look for the "Profile Pictures" album. There's a count element there.
Maybe. Read http://developers.facebook.com/docs/api/realtime/
Your app can subscribe to changes to a user's properties. The profile picture is a property of the user object so you can be notified when it changes. The other photos are not properties of the user object, they are listed under Connections at http://developers.facebook.com/docs/reference/api/user/ so I don't know if you can access them from the real time notification api. Whatever, you need the user_photos permission to list them.
When enabling Facebook Connect, any facebook user can then login to your website,
what type of user profile information can my website retrieve?
Username?
Email?
First Name?
Last Name?
There is a ton of information you can retrieve, if the user has permitted it through their privacy settings. Just about everything you can retrieve is in a FQL table somewhere:
http://wiki.developers.facebook.com/index.php/FQL_Tables
You cannot, however, get their email. You need to ask permission, using the API, to do that. This is also not a data bonanza, you can only permanently store the user ID. Everything else you can only store for 24 hours, then need to re-query Facebook for the information.
If you just want to display the user's first and last name, you can use FBML rendered with the Facebook Connect code.
http://wiki.developers.facebook.com/index.php/FBML
Khou,
There are seriously loads of API docs around.
Good luck on your facebook journey ;)