获取 Facebook 错误 11 [英] Getting Facebook error 11

查看:21
本文介绍了获取 Facebook 错误 11的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Eclipse 中的 BBplugin 5.0 版和 FB jar lib ( FacebookBlackBerrySDK-v0.8.25.jar )我得到一个错误API 错误代码:11API 错误说明:此方法已弃用错误消息:Display=wap 对话框已被弃用.您可以通过禁用july_2012"迁移来暂时启用它们.它们将在 2012 年 7 月 1 日永久停止工作.

I am using version 5.0 of BBplugin in eclipse and the FB jar lib ( FacebookBlackBerrySDK-v0.8.25.jar ) i get an error API error code :11 API Error Description : This method is deprecated Error Message: Display=wap dialogs have have been deprecated . You can temporarily enable them by disabling the "july_2012" migration.They will stop working permanently on july 1,2012.

http://supportforums.blackberry.com/t5/Java-Development/FaceBook-API-error-code-11-Method-Deprecated/td-p/1671793

我检查了这个链接..但它没有给出解决方案

I checked out this link .. But it isn't giving the solution

我仅试用了 2012 年 7 月的迁移解决方案我没试过把 display=wap 改成 display=touch

I tried out for july 2012 migration solution only i have not tried the solution display=wap into display=touch

因为我不知道它在哪里

在模拟器上运行时出现以下错误

i get the following error when i run it on simulator

http://tinypic.com/view.php?pic=191m3o&s=6

import com.blackberry.facebook.ApplicationSettings;
import com.blackberry.facebook.Facebook;
import com.blackberry.facebook.FacebookException;
import com.blackberry.facebook.inf.User;

import net.rim.device.api.ui.Field;
import net.rim.device.api.ui.FieldChangeListener;
import net.rim.device.api.ui.component.ButtonField;
import net.rim.device.api.ui.component.Dialog;
import net.rim.device.api.ui.component.EditField;
import net.rim.device.api.ui.container.MainScreen;


public class MyScreen extends MainScreen implements FieldChangeListener{

    private User user;
    String NEXT_URL = "http://www.facebook.com/connect/login_success.html";
    String APPLICATION_ID = "My App id"
    String APPLICATION_SECRET = "My Application Secret";


    String[] PERMISSIONS = Facebook.Permissions.ALL_PERMISSIONS;
    private Facebook fb;
    private ApplicationSettings as;
    private String id="";
    private EditField ef;

    private ButtonField bf;

    public MyScreen(String id ) {

        //      this.user = user;
        this.id = id;

        ef = new EditField("Hi", " ");
        bf = new ButtonField("Publish");
        bf.setChangeListener(this);
        add(ef);
        add(bf);

    }

    private void FBPost(){

        ApplicationSettings as = new ApplicationSettings(NEXT_URL, APPLICATION_ID, APPLICATION_SECRET, PERMISSIONS);
        Facebook fb = Facebook.getInstance(as);



        as = new ApplicationSettings(NEXT_URL, APPLICATION_ID, APPLICATION_SECRET, PERMISSIONS);
        fb = Facebook.getInstance(as);
        try {

            user = fb.getCurrentUser();
            String result = user.publishStatus(ef.getText());

            if ((result != null) && !result.trim().equals("")) {
                Dialog.inform("Publish Success.");
            } else {
                Dialog.inform("Publish Failed.");
            }
        } catch (FacebookException e) {
            // TODO Auto-generated catch block
            Dialog.inform("Exception in myscreen");
            e.printStackTrace();
        }


    }



    public void fieldChanged(Field field, int context) {

        if(field==bf){

            String text = ef.getText();
            FBPost();

        }

    }
}

以上是我的代码请退房

推荐答案

在 Facebook 上检查您的应用设置.并在迁移中禁用最后三个选项(2012 年 7 月的重大更改、包括状态签到、2012 年 8 月的重大更改).希望它会帮助您 :)

Check your app setting on facebook. and in Migrations disable last three options(July 2012 Breaking Changes, Include Checkins with Statuses, August 2012 Breaking Changes).Hope it will help you :)

这篇关于获取 Facebook 错误 11的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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