如何开始与Facebook SDK在android系统? [英] How to start with facebook SDK in android?

查看:170
本文介绍了如何开始与Facebook SDK在android系统?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新来的,一般的android的研究与开发,但我已经有了基本的。我想使用Facebook SDK来创建Android应用程序,虽然我没有发现什么方法或类使用可靠的信息源。
我试图按照在Facebook上开发了Android的教程,但我卡在那里我应该构建和运行工程的步骤:

I'm new to android developement in general, but i already got the basic. I want to use the facebook SDK to create an android app, although i have not found a reliable source of information on what methods or classes to use. I tried to follow the android tutorial on facebook developers, but i am stuck at the step where i am supposed to build and run the project:

Step 6.4: Build and run the project
Build and run the 'MyGreatApp' project. This should launch in the same emulator where you install the Facebook.apk. You will be prompted with the user authorization dialog (You may have to login to the Facebook app if not already done so):

但所提供的code似乎在这些行错误:

but the code provided seems to have errors in these lines:

facebook.authorize(this, new DialogListener(){

            @Override
            public void onComplete(Bundle values) {
                // TODO Auto-generated method stub

            }

它说:
- 的方法授权来自Facebook的类型指的是缺少类型活动

- 类型新Facebook.DialogListener(){}必须实现继承的抽象方法Facebook.DialogListener.onComplete(捆绑)

@Override
            public void onComplete(Bundle values) {
                // TODO Auto-generated method stub

            }

- 类型的新Facebook.DialogListener的方法的onComplete(包)(){}必须覆盖或实现超法

@Override
    public void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        facebook.authorizeCallback(requestCode, resultCode, data);
    }

- 的方法authorizeCallback(INT,INT,意图)从Facebook的类型指的是缺少类型意图

推荐答案

花花公子转到此链接<一个href=\"https://github.com/facebook/facebook-android-sdk/tree/master/examples/Hackbook/src/com/facebook/android\" rel=\"nofollow\">https://github.com/facebook/facebook-android-sdk/tree/master/examples/Hackbook/src/com/facebook/android它提供了FB全编码为Android

dude goto this link https://github.com/facebook/facebook-android-sdk/tree/master/examples/Hackbook/src/com/facebook/android it provides whole coding of FB for android

这篇关于如何开始与Facebook SDK在android系统?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆