Hi guys,
I'm trying to make an android app, working with Facebook.

The first step to do that (after creating a new facebook-app on
facebook) is asking access to the user's informations.

We can do that from this url : 
http://m.facebook.com/code_gen.php?v=1.0&api_key=[your
api_key]

You're going on this page, giving your account information, allowing
the app, and facebook is giving you a token key. Then, the token key
is used by the application to get informations.

So I'm loading this page on a WebView, with a EditText under it, and a
button. You have to enter your token key on this EditText, then
clicking the button.

I'm having trouble with the WebView. First of all, we have to connect
two times to Facebook. Then, we're clicking on the "Generate" button
(on the facebook page), but it's still loading this page again and
again.

I tried it on the Chrome navigator, and it works just fine!
I just don't get it! Maybe someone already had the problem and could
help me.

Here's some of my code :

the .xml view:
[...]
<WebView
                android:id="@+id/facebookview"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"
            />
[...]

the .java file:
[...]

WebView webview;
webview = (WebView) findViewById(R.id.facebookview);
webview.getSettings().setJavaScriptEnabled(true);
webview.setWebViewClient(new FacebookWebViewClient());
webview.loadUrl("http://m.facebook.com/code_gen.php?v=1.0&api_key=
[my_api_key]");

[...]

private class FacebookWebViewClient extends WebViewClient {
        @Override
        public boolean shouldOverrideUrlLoading(WebView view, String
url) {
            view.loadUrl(url);
            return true;
        }
}

[...]

and of course, on the AndroidManifest.xml:
<uses-permission android:name="android.permission.INTERNET" />

Does anyone have any ideas?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to