Reusing Social Media Profile Pictures - facebook

Consider an application with a messaging/commenting widget. When a user posts, his/her social media profile picture is used if they've given the app authorization etc. How is it that other users can also view that same profile picture? Even at a later date?
Would I store the users social media id in a database and call the picture for other users that way? Do social media sites allow you to use basic information like profile pictures and first name etc without an actual authorization from the user once you've got the id? Or are sites saving the images and data on their own servers for later representation?

Twitter profile pictures are just images stored on a public server; the images themselves can be retrieved regardless of whether or not you're logged in to Twitter.
Once your user allows you to access their Twitter profile, grab the URL for the image and store it in a database. Then, when you want to display the image, call it with the image URL just like you would any other image in a web application.

Related

Reading the PUBLIC user photos and storing for displaying later - Graph API v2.2

I have read the docs and I found that, I have to use the user_photos permission from the facebook user to read the photos from the user.
So after getting the permission, we could use access me/photos/uploaded to get the photos. The idea is to show the photos he/she has uploaded and allow them to choose the pics to store(the url) in my site's database.
Upon initiating the above Graph API call, we would get a list of photos in JSON format. Each photo will have several fields, along with id(FB unique ID) and source(FB's CDN url of the image).
If I want to store the URL of the image, and to display later to the visitors of my site, I have to store this source url? I mean the cached image URL that FB CDN provides ? Another thing is, if I store this URL, will this URL be changing later? I mean is it like a cached image for a particular time frame or something?

How to get all images uploaded by an app using facebook graph?

I am trying to make a facebook photo contest app. Users can upload an image via the app and it goes on their wall and into an album automatically created for my app. However I cannot find any way using the graph api to get the array of uploaded images for all users. Is this possible? I thought...
$facebook->api("/$app_id/photos?access_token=$app_long_life_access_token");
would work but it returns an empty array.
The photos are uploaded using...
$facebook->api($this->app_id . '/photos', 'post', $args);
I can access a single image using its id and the app's token but this will require looping through every single image id to get the details.
In order to access a users photo album (even if it was created by your application), you'll need a valid user access token. It's their album after all. If a user changes their password or even uninstalls your application, you will no longer have access to their content.
To keep track of all these photo's you'll have to monitor each upload and store it (in your database for example).
Facebook doesn't usually allow you to collect masses of data in this way. You will have to query each individual user or photo to get this info if you don't store it in some other method.

Can we track an image uploaded in Facebook?

This is the case, if we can track the images that we upload to the facebook page in order to known who download the images and located maybe the IP or the user profile.
You'd need to create a custom Facebook application that grabs user information based on the Facebook open graph for this. Users will have to allow your application to access their data first though. there is no way to track user information simply by uploading a photo on your wall/photo albums

How to use Facebook Photos in an iPhone App?

I have a client who wants to use their Facebook photos in an iPhone app. We want to embed their account into the app so that when people download the app, they see the client's Facebook photos. The user should not need to login or connect to Facebook.
This is different than the standard "connect to facebook so we can access you data" - we have no need to access the users data.
Do I need to create a Facebook App, connect the client's Facebook account to the Facebook app, then use that to get the photo data ?
Ok, here is what I found
My business page is http://www.facebook.com/pages/Feltpad-Web-Mobile/128861547181352
That number at the end (128861547181352) is the business' "Facebook Graph ID"
Then use the Business Graph ID and go to http://graph.facebook.com/128861547181352/albums and you will see a list of all of the Photo Albums associated with the business' page. There is only one album, so that is all the info you get. The first valuable line on that page says "id": "133208113413362" - this is the Facebook Graph ID for the album.
Then use the Album's Graph ID and go to http://graph.facebook.com/133208113413362/photos - this will give you a JSON file with all the data you need for all the photos in the album.
You can also use ?limit=25 and ?offset=50 or both ?limit=25&offset=50 to page through the results.
This should be easy. Facebook gives a public URL for albums that are public to be viewed by the Internet without necessity of logging in. You can see this URL al the bottom of the album page that you may want to share.
It looks like this:
Share this album with anyone by sending them this public link:
http://www.facebook.com/album.php?aid=[ALBUM_ID]&id=[USER_ID]&l=[SOME_PARAM]
(quoted from a public album)
you can easily leach data and extract images from there.
However it is more sane to create a Facebook app (takes hardy a minute) and use Facebook graph-API to make REST calls to retrieve all the data about albums and photos within them in well formatted JSON that will be far easier to handle the HTML. Once you have Facebook App in place, you may use it to fetch all the FB data but it violates both of your requirements (1)Not using Facebook app, and (2) user don't have to sign-in.
But it may worth looking at
http://developers.facebook.com/docs/api
http://developers.facebook.com/docs/reference/api/album
Well, there is some trick. If you go to the API page(http://developers.facebook.com/docs/api). Copy the URL given for Coca-Cola album (https://graph.facebook.com/99394368305) and make a request with photos REST command like https://graph.facebook.com/99394368305/photos you can access all the details of all the photos in the album in JSON format. I could not get it work for my personal public album though.

Facebook Connect and Photo Albums

I am currently developing a site for models/actors, and at this point I am just trying to ascertain what I can and can't do with Facebook Connect (I have virtually no experience in using Facebook Connect or FQL).
Basically there is going to be a facility whereby users will be able to upload their pictures. I want to know is it possible to use Facebook Connect to get the user's photo albums, in order to save the user from re-uploading all the photo's that are already on FB?
If so, do I/should I LINK to these photos, or FETCH them from Facebook and save a copy on my server?
EDIT: Just to clarify, this is what I want to do:
User will register on my site and agree to associate their Facebook ID with my site.
I then want to present the user with a list of all their albums that are on Facebook, the user can then select which albums they want to display on my site.
(optional) The user can select which specific photos in each album they want to display on my site.
Is this possible to do at all?
You can upload photos using the API. Check out this: http://developers.facebook.com/docs/reference/api/photo
If it were me, I would just upload the photo to Facebook and save the URL of the image rather than store it on my own server. You could do either one, but I don't see the sense is storing the image twice. The one issue could be if you wanted your photo at a higher quality than Facebook allows, but their quality is pretty high.