facebook - Trouble opening FB page from my android app -


i using following code open facebook page android app. opening page using fb app page opened not fb page. more section. screenshots attached.

    public static string facebook_url = "https://www.facebook.com/localpakistanigamesandroid/";     public static string facebook_page_id = "localpakistanigamesandroid";     public string getfacebookpageurl(context context) {         packagemanager packagemanager = context.getpackagemanager();         try {             int versioncode = packagemanager.getpackageinfo("com.facebook.katana", 0).versioncode;             if (versioncode >= 3002850) { //newer versions of fb app                 log.d("my","new version");                 return "fb://facewebmodal/f?href=" + facebook_url;             } else { //older versions of fb app                 log.d("my","old version");                 return "fb://page/" + facebook_page_id;             }         } catch (packagemanager.namenotfoundexception e) {             log.d("my", "app not found");             return facebook_url; //normal web url         }     }  intent facebookintent = new intent(intent.action_view); string facebookurl = getfacebookpageurl(this); facebookintent.setdata(uri.parse(facebookurl)); startactivity(facebookintent); 

opened page: http://oi65.tinypic.com/33ads8h.jpg

actual page: http://oi66.tinypic.com/2yycp6c.jpg http://oi66.tinypic.com/2yycp6c.jpg


Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -