开发者

The new Appcelerator Titanium Facebook API: How do we perform a simple connect?

I'm trying to use the new Face开发者_如何学JAVAbook Graph API with Appcelerator Titanium Mobile 1.6 . I found two complete examples on the net: That one from the official blog et the Aaron's one.

In both examples, I wonder where should put the app_id and the app_secret? Where the login action is performed?

Thanks.


i didn't try it, but have a look at the api Ti.Facebook and the dev.facebook-help. maybe it will help you to find a solution.


There's loads of examples on the documentation page for the module - the app_id should go in tiapp.xml and then is also set within your code, as stated on that page (see the authorize example). I don't think secret is used anymore in the new Facebook module.


You have to register you application in http://developers.facebook.com -> Apps -> Create new app

After that you will see app id and app secret.


Titanium.Facebook.appid = "your app id";

put above line in app.js file

   <module platform="iphone">facebook</module>
   <module platform="android">facebook</module>

put this live in tiapp.xml

first you have to require facebook.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜