获取Facebook的错误11 [英] Getting Facebook error 11
问题描述
我使用
BBplugin的5.0版本在Eclipse和FB罐子LIB(FacebookBlackBerrySDK-v0.8.25.jar)
我得到一个错误
API错误code:11
API错误说明:此法德precated
错误信息:显示= WAP对话都已经去precated。您可以通过禁用july_2012migration.They将停在七月1,2012永久工作暂时启用它们。
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.
<一个href=\"http://supportforums.blackberry.com/t5/Java-Development/FaceBook-API-error-$c$c-11-Method-De$p$pcated/td-p/1671793\" rel=\"nofollow\">http://supportforums.blackberry.com/t5/Java-Development/FaceBook-API-error-$c$c-11-Method-De$p$pcated/td-p/1671793
我检查了这个链接..
但它不给解决方案
I checked out this link .. But it isn't giving the solution
我尝试了仅2012年7月的迁移解决方案
我没有尝试过的解决方案显示= WAP到显示器=触摸
I tried out for july 2012 migration solution only i have not tried the solution display=wap into display=touch
,因为我不知道它在哪里。
as i don't know where it is
我得到以下错误,当我在模拟器上运行它。
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();
}
}
}
以上是我的code请
检查
Above is my code Please check out
推荐答案
检查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屋!