Titanium, Android and Facebook

You must Login before you can answer or comment on any questions.

So i made a facebook "app",and now i am at the screen which says "app id" and "app secret". It is asking me what my app is - native android? native iOs? Other?

What do i put the app as, native android? mobile web? website with facebook login?

Given that mobile web and website with facebook login both require me to provide a url, what do i do?

2 Answers

You go to developersfacebook and select iOS. You create a app name and you got appid and secret. Both you transfer to tiapp.xml.

In this manner you can connect to facebook:

exports.get = function(_options, _callback) {
    function getFacebookFriends() {
        Ti.Facebook.requestWithGraphPath('me/friends', {}, 'GET', function(_fb) {
            if (_fb.success) {
                var result = JSON.parse(_fb.result);
                var friends = result.data;
                for (var i = 0; i < friends.length; i++) {
                    var id = friends[i].id;
                    friends[i].image = 'https://graph.facebook.com/' + id + '/picture';
                }
                _callback(friends);
            } else {
                _callback(null);
            }
        });
    }
    Ti.Facebook.appid = '202972****04444';
    Ti.Facebook.permissions = ['read_friendlists', 'publish_stream'];
    if (Ti.Facebook.loggedIn == false) {
        Ti.Facebook.authorize();
        Ti.Facebook.addEventListener('login', function(_e) {
            if (_e.success == true) {
                getFacebookFriends();
            }
        });
    } else
        getFacebookFriends();
};

i dont think you must choose what is the type of his app/platform

unless you want to publish it to the application center in facebook, so if his app is on android he must choose android or if its ios then ios ..

i have 7 apps which interact with facebook, and i didnt choose the type of the app on many of them

Your Answer

Think you can help? Login to answer this question!