Facebook上的OAuth实现黑莓 [英] Facebook oAuth implementation for blackberry
问题描述
我工作的黑莓机应用程序,它使用如Facebook和信息共享的Twitter功能。 goggling后,我发现我可以利用Facebook的SDK,以便与Facebook整合的服务。
I am working on a blackberry native application, which uses the features like Facebook and twitter sharing of messages. After goggling I found that I could make use of Facebook SDK in order to integrate with Facebook service.
我从这个链接 https://sourceforge.net/projects/facebook下载SDK -bb-SDK /
我跟随了在自述PDF文件,这与SDK捆绑被解释的步骤。我按照下面的步骤
I have followed the steps that are being explained in the README pdf file, which was bundled with SDK. I have followed the below steps
第一步:获取Facebook的外观实例
Step1: Getting Facebook façade instance
String NEXT_URL = "http://www.facebook.com/connect/login_success.html";
String APPLICATION_ID = "15355516805e272"; // my app id
String APPLICATION_SECRET = "354f91a79c8fe5a8de9d65b55ef9aada"; // my app secret key
String[] PERMISSIONS = Facebook.Permissions.USER_DATA_PERMISSIONS;
ApplicationSettings as = new ApplicationSettings(NEXT_URL, APPLICATION_ID,
APPLICATION_SECRET, PERMISSIONS);
Facebook fb = Facebook.getInstance(as);
第二步:获取当前用户
fb.getCurrentUser(new BasicAsyncCallback() {
public void onComplete(com.blackberry.facebook.inf.Object[]
objects, final java.lang.Object state) {
user = (User) objects[0];
// do whatever you want
}
public void onException(final Exception e, final
java.lang.Object state) {
e.printStackTrace();
// do whatever you want
}
});
第三步:发布用户状态
user.publishStatus("Hello world!");
但是,它给IOException异常,并没有任何反应。我相信很多人都做过早期类似的事情。我在找一个源解释一步与Facebook服务于一体的步骤。
But, it gives IOException and nothing happens. I am sure many people have done similar things earlier. I am looking for a source explains step by step process of integrating with Facebook service.
推荐答案
我最近实施的 Facebook和放大器;微博集成到我的黑莓7基于应用程序。我发现有什么用,有错误和Facebook API,即使它是在测试version.Please试试下面的API:的 FacebookAPIMe 和 TwitterAPIMe 。如果您在执行这一API的任何问题,我会帮you.Both是简单易用,轻松与application.Both整合是包含示例应用程序,以便您还可以查看该API的演示。
I have recently implemented Facebook & Twitter Integration into my Blackberry 7 Based Application. What i Found with this, Facebook API having Errors and even it is in Beta version.Please try Following API: FacebookAPIMe and TwitterAPIMe. If you have any problem in implementing this APIs, i will help you.Both are Simple to Use and Easily integrated with your application.Both are Containing Example App so You can also view Demo of that API.
这篇关于Facebook上的OAuth实现黑莓的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!