I am trying to integrate Facebook into my application. But as soon as I clicked on fbphoto , it throws an android.content.res.Resources$NotFoundException . I know that it throws an error because the corresponding resource is not created at runtime.
Found that the error occurs when facebook.authorize(this, new String[] { "email", "publish_stream"}, new DialogListener() {} . But the main reason is still missing.
fbphoto.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View arg0) { // TODO Auto-generated method stub loginToFacebook(); } }); public void loginToFacebook() { if(!facebook.isSessionValid()) { facebook.authorize(this, new String[] { "email", "publish_stream"}, new DialogListener() { }); }
02-08 02:57:58.236: E/AndroidRuntime(1582): FATAL EXCEPTION: main 02-08 02:57:58.236: E/AndroidRuntime(1582): android.content.res.Resources$NotFoundException: String resource ID
Any help would be appreciated!
source share