Using facebook sdk in AWS lambda? - facebook

Is it possible to use facebook sdk(js) in aws lambda? I need to use facebook graph api to fetch content, it's working on browser but i need to move it to aws.

Related

azure app authentication/authorization between apps

I have an azure mobile all that uses authentication/authorization with facebook, everything is setup and working on my mobile app, I’m able to authenticate with facebook and get an access token.
I also have a web app (ODATA) hosted in azure and also uses authentication/authorization with facebook and its also working fine if I try to access the ODATA service it redirects me to facebook to login.
According to this article (https://azure.microsoft.com/en-us/blog/announcing-app-service-authentication-authorization/) I should be able to silently or programmatically send the access token from the mobile app to the web app by sending a json with acces_token key.
The may question is how I do this, is that access token in the header or where should I write it I can find any information from it. I would really appreciate a code example or an article that can guide me to accomplish my task
The may question is how I do this, is that access token in the header or where should I write it I can find any information from it. I would really appreciate a code example or an article that can guide me to accomplish my task.
Based on my understanding, you are using Client-managed authentication for independently contacting the facebook then retrieve the access_token from facebook, then you could leverage the access_token to login with your azure mobile app backend.
Also, you have a Azure Web App uses authentication/authorization with facebook and use the same facebook App ID. Then you want to leverage the access_token in your mobile client to access your another Azure Web App. At this point, you could login with your azure web app and retrieve the authenticationToken as follows:
POST https://{your-app-name}.azurewebsites.net/.auth/login/facebook
Body {"access_token":"******"}
Then, you could leverage the authenticationToken and set it as the x-zumo-auth header when accessing your azure web app as follows:
Get https://{your-app-name}.azurewebsites.net/api/values
Header x-zumo-auth:{authenticationToken}
Additionally, you could create your custom Web API endpoints within your azure mobile app, details you could follow adrian hall's book about Custom HTTP Endpoints.

Facebook app with REST API

Can I create a new Facebook app to use old REST api for user authentication. I would like to use the method auth.login for user authentication. Is it possible to use REST api with new facebook apps?
The Facebook's legacy REST API does not work for new Facebook apps registered after Apr/2013. However, REST API is still supported for existing Facebook app created before Apr/2013.
You will get "Error 3 : Application does not have the capability to make this API call" when trying to access REST API from the new Facebook app.
For newer Facebook app, please use Graph API to achieve the similar functionality as in the legacy REST API.
The REST API is deprecated now. Blog post here: https://developers.facebook.com/blog/post/616/

Using the GData API, is there a way to authorize an application access to a single Google Doc Spreadsheet?

I'd like to read and write data to a published Google spreadsheet via the GDATA API, but I don't want my app to be authenticated with full Spreadsheet authorization (giving it full access to that user's docs).
It seems that it is not possible according to the official documentation.
The documentation does not indicate if it is possible to restrict the scope of authentication OAuth2 : http(s)://spreadsheets.google.com/feeds/.

How to validate a Facebook application existence?

I'm currently building a Facebook integration program, and I wanted to know if it is possible to verify the existence of Facebook application by either with or without the Facebook API.
Just call the Facebook graph api by accessing the app's name or id:
http://graph.facebook.com/appId
or http://graph.facebook.com/appName
If you are trying to search for apps, you could scrape this url:
https://www.facebook.com/search.php?q=appNameSearch&type=apps

Facebook App. with GWT

I am writing a Facebook Application using the Google Web Toolkit. My methodology to authenticate users is using the graph-api to get the access token with Open authentication as told in this article:
restfb: Writing a facebook application with java (using the new graph api)
But in the very first step. Facebook doesn't allow to redirect to a page(even if it's facebook itself) from the canvas. So it creates a link. I guess there's a php solution for this in this article:
How to authorize Facebook app using redirect in canvas?
How can we apply this solution(or any other solution) to GWT directly in Java?
Best option is to use JAVAScript and wrap it with JSNI, otherwise do it from the backend.
There's an existing library that you can use: http://code.google.com/p/gwt-facebook/