Trouble with Facebook - java.lang.RuntimeException: Unable to start activity ComponentInfo = ANDROID ISSUE -
i have no idea i'm doing..
i mean do, i'm not advanced guys, feel noob.
anyway, copied , pasted code facebook sdk developer site android.
here manifest
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.fbdps.brcr" android:versioncode="1" android:versionname="1.0" > <uses-sdk android:minsdkversion="8" android:targetsdkversion="17" /> <uses-permission android:name="android.permission.internet"/> <application android:allowbackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/apptheme" > <activity android:name="com.fbdps.brcr.mainactivity" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.main" /> <category android:name="android.intent.category.launcher" /> </intent-filter> </activity> <meta-data android:value="@string/app_id" android:name="com.facebook.sdk.applicationid,"/> <activity android:label="@string/app_name" android:name="com.facebook.loginactivity"></activity> </application> </manifest>
and here java
package com.fbdps.brcr; import android.os.bundle; import android.app.activity; import android.content.intent; import android.widget.textview; import com.facebook.*; import com.facebook.model.*; public class mainactivity extends activity { @override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); // start facebook login session.openactivesession(this, true, new session.statuscallback() { // callback when session changes state @override public void call(session session, sessionstate state, exception exception) { if (session.isopened()) { // make request /me api request.executemerequestasync(session, new request.graphusercallback() { // callback after graph api response user object @override public void oncompleted(graphuser user, response response) { if (user != null) { textview welcome = (textview) findviewbyid(r.id.welcome); welcome.settext("hello " + user.getname() + "!"); } } }); } } }); } @override public void onactivityresult(int requestcode, int resultcode, intent data) { super.onactivityresult(requestcode, resultcode, data); session.getactivesession().onactivityresult(this, requestcode, resultcode, data); } }
i can't make app work.. see picture below..
thanks in advance!!!
here strings.xml
<?xml version="1.0" encoding="utf-8"?>
<string name="app_name">brcr</string> <string name="hello_world">hello world!</string> <string name="menu_settings">settings</string> <string name="app_id">158392974335182</string>
Comments
Post a Comment