Is it possible to use a self expiring photo through a link to a 3rd party server as a social media profile picture? - facebook

Suppose I have developed an app that creates encrypted images with a self expiring link that can only be opened through browser, and I want to use such service to have temporary profile picture say on facebook.
When I use Devise and OAuth in a web app, every time user signs in, e.g. with facebook credentials, it retrieves an image through a link from facebook server (of course you can optionally save the image on the app's server). I wonder if a reverse mechanism can be used to ask facebook to use a certain link for profile photo, and if nothing is available just uses a default profile photo.

Related

Unable to Login to Facebook for Developers

I don't use Facebook, so I had to create an account in order to integrate a Facebook Login into our project. I setup the developer account and took down the App Id and App Secret. The response when I try to connect to Facebook currently is:
Can't Load URL: The domain of this URL isn't included in the app's
domains. To be able to load this URL, add all domains and subdomains
of your app to the App Domains field in your app settings.
So I would like to try updating the domains listed. However when I attempted to login I was prompted to provide a picture of myself (which I did) then given this message:
You Can't Log In Right
Now Thanks for sending your photo. We'll get in
touch with you soon after we've reviewed it. Right now, your account
has been disabled as a security precaution.
No timeline, no further information. Any ideas?
Facebook cleared me for access, without notification.

Facebook Graph API - Publicly access Pages info

I have a JavaScript script that fetches data of a Facebook Page URL and puts it in a form. It works perfectly as long as I am connected to my Facebook Developer Account, and that I use the corresponding App ID.
My question is: can I make this public? Without need to be connected to my Facebook account? I want users on my website to be able to use this feature but I can't figure this out, and I'm now wondering if it's even possible.
This concerns Pages specifically (not Events).
You either have to make users login to your app (so that you can use their access token to request the data),
or you need to move it to the server side, so that you can use either an app or a page access token (both of those should never be exposed in client-side code.)

Sharing an image link at the time of upload to facebook

For a variety of reasons I won't go into, I am unable to upload photos to a user's FB account from a standalone kiosk application.
As an alternative what I would like to try is
1- the user logs in to their FB account with name & password
2- the photo gets uploaded to one common admin account,
3- just the link to this uploaded photo gets posted to the user's feed.
So in essence there would be 2 login + uploads.
The first would be hidden from the user and have the hardcoded email+pw for the common admin account. The photo would be uploaded here.
The 2nd would be the one the user sees and would control just the posting of the link to the previously uploaded photo.
Can any facebook experts chime in and suggest whether this is possible?
I am using a local node.js,passport, express server to handle login and authentication.

Is it legal to use facebook profile photo

Is it legal to create a web application where users can paste a facebook profile url and app will download and present a profile photo from that link ? An application won't be storing any data of that user.
No, you can´t do that because:
Scraping is not allowed, and that´s what you would need to do.
You can´t be sure if the user who posted the URL is the owner of the profile, he may just paste ANY URL. So the user who owns the profile may not have authorized you to use it.
The proper way to get the profile photo is to authorize the user in your App and use the /me/picture endpoint.

Facebook login with multiple domains

I know that facebook allow me to specify multiple domains for my app.
But in the "Website with Facebook Login" i can only specify one url.
Is it possible for me, to authenticate users on domain.se, domain.dk and domain.net with the same App ? Or should i still create one app, for each domain ?
It is technically possible to use Facebook Connect on multiple domains, there are some limits (5 domains max).
So the key to doing this is adding all domains in the App Domain field under your app settings.
The PROBLEM, however, is that Facebook only lets you add domains that are derived from your Canvas URL or Site or Page tag URLs, so if you try to enter anything else you get an error that looks like this:
The SOLUTION is to create App on Facebook, Website, and Facebook Tab using the ADD PLATFORM button and then put in URLs that point to your other domains. Here is an example of what I mean:
If you use a unique domain for each field you can max out with 5 different domains. I have tested this technique with up to 3 domains, but i think it should work for all 5.
Note: Facebook admin features change from time to time, so all of this is subject to change
As long as you listed all the desired App Domains in application settings you should be able to authenticate users on any of them.
"Website with Facebook Login" is really only intended to be used as link to your site/application.
Update 2 (July 2016):
App domains must match the domain of the Secure Canvas URL, Mobile Site URL, Unity Binary URL, Site URL or Secure Page Tab URL.
Update (December 2013):
At the time of writing original answer it was possible to list any domains in application settings but from that time the UI of Application Settings (as well as way of handling Application Domains) changed at least couple of times, at some point you could only list domains that derive from one of application's canvas pages.
As of December 2013 it is possible (again) to list domains that do not derive from application canvas URL.
Assuming your domains are being served by the same web server and you have access to that web server, you can use the manual login procedure: https://developers.facebook.com/docs/facebook-login/manually-build-a-login-flow to login from as many domains as you wish.
Assume your domains are site1.com,site2.com.... Instead of using the Facebook javascript API, you will simply place a plain old Log In with Facebook button on each site which will redirect the browser to the facebook login page as described in the above article. In the state variable you can specify a code which indicates which of your sites is requesting a login. In the redirect you will use a single service domain which you assign to your web server (e.g. fb.mywebserver.com) and which you specify as the verified redirect url in the facebook login settings page. All the sites will redirect to this same url, avoiding the problem of supporting multiple domains.
Once the user has logged in, the browser will redirect to fb.mywebserver.com and pass it the state, which tells you which site is requesting login and a code which you can use on the back end to retrieve the user's info using the Facebook graph apis. You store this info with a uid in your data store then using the info in state, you redirect to to the appropriate site including a parameter that indicates a Facebook login (e.g. site1.com?fbc={some uid}). The browser will obediently then call site1.com?fbc... Your web server will receive this request and detect the fbc parameter which tells it to associate the corresponding Facebook logged in user with this site. It can then retrieve the logged in users info using the uid and, for example, return a session cookie for this user along with the page. If you generate the page on the server you can, of course, also include a welcome "user" or alternatively, your client code can do an ajax call to retrieve that information.
From the user's standpoint they press the Login with Facebook button, are redirected to a Facebook login page where they login and then are redirected back to your site in a logged in state. Not quite as nice as having the login popup but likely acceptable.
A similar process can be used for google logins as well
Best thing I've found to do in the development/production scenario is add a "Test App", then add a platform for your development web site - as you have to provide where the "page tab url" lives if you use that as a platform.
Facebook requires your "page url" to be live / accessible if you need to apply for status or permission review.
This got me around the "login in development" / "login in production" scenario.