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/
Related
I have a page with Facebook connect button. After the user clics on the button and grants the required permission, I need to check the login status.
Is it possible to do that without using javascript ? probably using the Graph API.
I'm using APEX and the page contents will depend on whether the user is connected to my app or not.
For info the user is asked to connect to my app using login page :
https://www.facebook.com/v2.10/dialog/oauth?client_id=xxx&redirect_uri=www.example.com&scope=public_profile,email,user_friends
Thanks for your help.
There is, but using the Javascript SDK is encouraged for web applications. See Facebook's documentation for implementing login on other platforms, specifically when dealing with browsers that don't support Javascript.
I'm developing an application that the only way to access the protected pages is through the Facebook's authentication. In this cenario, I need to login with a Facebook's test user and made my tests.
I'm using the PHP-SDK, so I need to figure out a way to login with an user test only with PHP (without javascript) and without a browser and cookies (because my tests runs only on command line, emulating a browser, without selenium for example).
Ideas about how I can test my protected pages that the only way to access is using a Facebook's user?
I am not familiar with the PHP-SDK but on a more general level I would stub out Facebook.
Your tests don't need to depend on a third party service: the build might fail because Facebook is down and running your test will be slow as it needs to wait for Facebook to report back each time.
Can't you stub the Facebook endpoint and send your own response back (one that looks like the Facebook one)? You could do this with an HTTP faker. For Ruby I would use something like FakeWeb but there are probably some similar tools out there for PHP.
Facebook now has test users, which can use most of Facebook except for interacting with real users. You can create them in your developer control panel or via the Graph API. There's even an API call that allows you to automatically create friendships between your test users. https://developers.facebook.com/docs/test_users/
I am working on a mac application which involves Facebook support so that they can share to Facebook via our app.
For this, I am using Facebook Graph API's which internally uses oAuth protocol to access user resources. In this process, it uses webview to enter users credentials(username and password) which provides the "Access_token".
But my requirement of the application is that it should not use webview to enter user credentials rather it should use other view controller to provide user credentials. So I need to go for xAuth protocol as in twitter uses.
Can anyone help me in this issue? If facebook supports xAuth, please make suggestions.
Facebook doesn't offer "desktop" application authentication support as detailed here: https://developers.facebook.com/docs/authentication/
What you would have to do, is get them to authorize your app on a website, then use the access token for the desktop app and that is if your app is connected to some kind of server.
Otherwise you will have to follow their suggestion of embedding a browser and reading the access token once it is received.
I am developing a desktop fb app like yoono.
For windows, user can open the application and update his status and read the feeds.
For this I am required to have app id.
Therefore I created a new Facebook app in link https://developers.facebook.com/apps.
But I don't understand how to integrate that Facebook app so that it works like desktop app.
I mean the code is written in my computer program not in any site etc.
Please tell me what what I do since I didn't own any website either therefore I cant provide any canvas url.
There is a setting for desktop apps in the advanced tab. Make sure it is set to Native/Desktop.
The graph API is a web API. You send a HTML POST request to a URL and receive a JSON string that you have to decode. What's a bit more complicated is authentication. Because you will need a user access token to query a user's friends list or personal details. Even the user's ID.
Search on the web for a Facebook API wrapper in your programming language of choice. The ones provided by facebook are obsolete (Except for the PHP one).
I'm trying to make an application that can connecto to facebook. I've found Facebook Connect for iPhone and I don't like the login form that it has.
Is there any way to make a custom login form? Is there some api functions to call to login an user on Facebook?
Thank you.
I would recommend not going this route. I'd be suspicious of any app that's asking for credentials that's not using the de-facto standard login control. If there is no standard control, then I have to take my chances with whatever the app presents, but in the case of Facebook, the standard control is part of Facebook Connect.
Just use one of the other API's such as the REST API and then create your own UI to capture the login credentials and call the REST API to login.