Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

not able to run facebook login button for android (titanium 3.1.1 android 4.0)

$
0
0

tiapp.xml

<modules>
        <module platform="android">facebook</module>
        <module platform="iphone">facebook</module>
    </modules>
<property name="ti.facebook.appid">******************</property>
..............................................................................................................................

app/controllers/facebook.js

var win = Ti.UI.createWindow({
        backgroundColor : "yellow"
});
var fb = require('facebook');
fb.appid = '****************';
fb.permissions = ['user_photos', 'friends_photos'];
 
win.add(fb.createLoginButton({
    top : 50,
    style : fb.BUTTON_STYLE_WIDE
}));
 
function facebookbutton(e) {
 
    win.open();
 
}
..............................................................................................................................

app/view/facebook.xml

<Alloy>
 
    <Button id="shinyfacebook" onClick="facebookbutton">FaceBook</Button>
 
    <!--<LoginButton ns="Ti.Facebook" />-->
</Alloy>
..............................................................................................................................

app/view/index.xml

<Alloy>
    <Window class="container">
        <View id="view1">
                <Require  src="facebook" ></Require>
 
        </View>
    </Window>
</Alloy>
.............................................................................................................................

app/controllers/index.js

$.index.open();

Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>