{"id":5642,"date":"2014-04-04T15:16:43","date_gmt":"2014-04-04T15:16:43","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/04\/04\/how-to-redirect-another-activity-after-successfully-login-with-facebook-in-android-collection-of-common-programming-errors\/"},"modified":"2014-04-04T15:16:43","modified_gmt":"2014-04-04T15:16:43","slug":"how-to-redirect-another-activity-after-successfully-login-with-facebook-in-android-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/04\/04\/how-to-redirect-another-activity-after-successfully-login-with-facebook-in-android-collection-of-common-programming-errors\/","title":{"rendered":"How to redirect another activity after successfully login with facebook in android?-Collection of common programming errors"},"content":{"rendered":"<p>I have used the Facebook SDK, as can be seen in my example:<\/p>\n<pre><code>mFacebook.authorize(this, new String[] { \"friends_birthday\", \"friends_about_me\", \"read_friendlists\" }, new DialogListener() {\n\n            @Override\n            public void onFacebookError(FacebookError arg0) {\n\n            }\n\n            @Override\n            public void onError(DialogError arg0) {\n\n            }\n\n            @Override\n            public void onComplete(Bundle arg0) {\n\n                \/\/start activity here. \n\n            }\n\n            @Override\n            public void onCancel() {\n\n            }\n        });\n<\/code><\/pre>\n<p>To start an activity in general (put this in <code>onComplete()<\/code>):<\/p>\n<pre><code>Intent intent = new Intent(context, TargetActivity.class);\nstartActivity(intent);\n<\/code><\/pre>\n<p>Also, make sure that you add the Target Activity into your AndroidManifest.xml. You must do this in tags. Without this, your application will crash.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have used the Facebook SDK, as can be seen in my example: mFacebook.authorize(this, new String[] { &#8220;friends_birthday&#8221;, &#8220;friends_about_me&#8221;, &#8220;read_friendlists&#8221; }, new DialogListener() { @Override public void onFacebookError(FacebookError arg0) { } @Override public void onError(DialogError arg0) { } @Override public void onComplete(Bundle arg0) { \/\/start activity here. } @Override public void onCancel() { } }); [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5642","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5642","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=5642"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5642\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=5642"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=5642"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=5642"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}