Social connect (oauth) avatar best practices. Copy or link? - facebook

I use oauth with twitter/facebook/google+ to allow users of our website to signup and signin. We display the users' avatar with user generated content across the site.
With facebook the original image keeps the same url when the user change it (http://graph.facebook.com/[userid]/picture?type=normal)
But on twitter every image used as avatar has a different url (http://a0.twimg.com/profile_images/[slug]/[other_slug]_reasonably_small.jpeg)
What is the best practice to display these images, and what is allowed by the terms of use.
1- Download a copy of the image and create a media on our server, then users can change it as they see fit?
2- Always link to original image and update the link in user profile on sync?

Related

Are facebook developers required to rehost profile pictures?

I'm developing an app that authenticates users with Facebook. I'd like to display the user's profile picture in their account, which is readily accessible via a public Facebook URL.
Am I permitted to directly link to these images for use in our app, or do we need to download the image and re-host it on our own servers? I wasn't able to find any answer in the terms of service.
You should NOT use the CDN link, because that one may not be valid forever. It is perfectly fine to download the profile image - if you REALLY want to be safe, tell the user about it before he authorizes your App. You need to have a privacy policy anyway, stating what exactly you store about the user.
It is perfectly fine to use the Graph API link though. Depending on how many images you want to show, it may be better to still download them for performance reasons.

Best way to retrieve facebook profile images using MVC5 OWIN

I am using OWIN in mvc5 to authenticate users, but I want to show their profile pictures as well. I have searched on strackoverflow and found the following way to get it done.
This is for facebook & Google plus :
https://plus.google.com/s2/photos/profile/[USERID]?sz=100
http://graph.facebook.com/[USERID]/picture?type=square
Is this the best way to retrieve the images? Should we store images onto our server and load locally or we call these links every time someone logs in ? I need a proper approach, e.g. If we store them locally then they won't be updated if user changes their profile picture on facebook but if we load them every time from facebook then it takes some loading time to do a 302 redirect to actual image url.
If you're just trying to display the images on a website, I would just store the link your given from Facebook/Google when someone logs in to your site in a local database and use the URL as the image src on the website. Facebook and Google will be storing these images on fast CDNs, you might as well take advantage.
This will off load the image storage and the need to serve up images from your own site, reducing load and storage requirements.
Then every time a user logs into your site retrieve their profile pic urls again and store them to make sure they are up to date.

Facebook Feed Dialog - Can we use the application logo as the image?

I'm using the Facebook Feed Dialog to promote simple sharing on my website.
There is an option for the "picture" in the post (URL).
Is there a way i can use the existing logo in my Facebook application as the image?
For example is there a way i can programatically create a URL to my Facebook application logo? (using the application ID).
You can do this with https://graph.facebook.com/APP_ID
And then fetch the logo_url.
Edit: Just wanted to add that obviously apps in sandbox mode require access token to recognize you as admin/tester.
You can't use that logo in your feed dialog, since its saved in the facebook server. (facebook don't allow that)
The straight-forward solution is - use the image from your server.

Facebook app. How to upload images to the app? Does it have it's own wall or albums?

I have Facebook application ready and token, app id, secret. Now I have searched a lot and it seems that I am unable to upload image to App wall or create album for the app.
What do I have:
Facebook app with canvas where user can enter data and upload an image(to my PHP script on a server)
What do I want to do:
To save the image on my app somewhere from PHP using PHP SDK.
What's the closest approach I have done:
Googled A LOT
I have added login/logout for user so I could upload
the image to user wall or album but I want to photo to be on the app
itself so to bypass the user authentification and I need to store
the image on my app somewhere.
Is this possible?
An App itself does not have a place to display images/videos.
You will need to create a Page for the App. To do this, go to developers.facebook.com/apps and click 'Edit App' in the top-right. In the 'App Details' section, click the button labelled 'Create Facebook Page' and follow the steps. This will create a Page to represent the App. You can then upload images/videos etc. as you would do with any other page.
Or, you could give the impression of storing an image on your App by storing the image in a database and recalling it upon demand...

iPhone + picture share + picture host

I wrote an app for iPhone which lets you create a picture (kind of like photoshop). I wanted to let people share their pictures via Facebook for example, however their API only allows you to show images in a user's news feed via an image URL (you can't first upload a local image to the facebook servers and host it from there). It looks something like:
"Hey checkout what I made: ", "http://somesite.com/myimage.png"
I was thinking of creating an account at a site like photobucket.com, and whenever a user shares a picture in my app, I first upload it to the picture site, then use that url. I have a feeling that would somehow violate terms of use.
I could get an unlimited hosting account to store the pictures (like at godaddy) but don't think it would really scale very well as I'm sure an unlimited account really does have limits, just not advertised too well. Any suggestions on how I could get around this?
Thanks
You can most defently upload your images to Facebook, look at the API more closely, and check out Facebook Connect for iphone http://developers.facebook.com/connect.php?tab=iphone and here is the link for the API call to upload pictures http://wiki.developers.facebook.com/index.php/Photos.upload