Facebook App Will Not Open On Android

Poster un nouveau sujet   Répondre au sujet    Addict Corporation Index du Forum -> Secteur public -> Candidature
Sujet précédent :: Sujet suivant  
Auteur Message

Hors ligne

Inscrit le: 05 Mai 2016
Messages: 174
Localisation: Roma

MessagePosté le: Mar 9 Jan - 18:13 (2018)    Sujet du message: Facebook App Will Not Open On Android Répondre en citant

Facebook App Will Not Open On Android

Then start an intent as follows: Intent facebookIntent = new Intent(Intent.ACTIONVIEW); String facebookUrl = getFacebookPageURL(this); facebookIntent.setData(Uri.parse(facebookUrl)); startActivity(facebookIntent); shareimprove this answer answered Oct 25 '17 at 12:16 Bilal Ahmad 293 add a comment up vote 2 down vote Intent intent = null; try { getPackageManager().getPackageInfo("com.facebook.katana", 0); String url = " intent = new Intent(Intent.ACTIONVIEW, Uri.parse("fb://facewebmodal/f?href="+url)); } catch (Exception e) { // no Facebook app, revert to browser String url = " intent = new Intent(Intent.ACTIONVIEW); intent .setData(Uri.parse(url)); } this.startActivity(intent); shareimprove this answer answered Dec 15 '16 at 2:14 Tiger developer 13017 add a comment up vote 2 down vote Best answer I have found, it's working great. thank you. .. Sign in 80 Loading. Find us on Facebook Follow us on Twitter Check us on Google+ Subscribe to our rss feed Login Register DailyHoroscope OurApps Top10 OurPaper PaperArchive Weather 7 London HOME News Showbiz & TV Sport Comment Finance Travel Entertainment Life & Style HomePage Missing Mystery! . Adam Bednarz 179,628 views 1:31 Samsung Galaxy : How to Log out Account on Facebook for Android App - Duration: 1:16. Jamie Wagner 167,720 views 9:15 How to Uninstall & Reinstall Facebook Mobile on My Android : Facebook Info - Duration: 2:17. Loading. Posting it here just to simplify and make the implementation reusable) "fb://page/ does not work with newer versions of the FB app. Loading. * * Example usage: * * {code newFacebookIntent(ctx.getPackageManager(), " * * param pm * The {link PackageManager}. asked 6 years, 11 months ago viewed 246,024 times active 2 months ago Blog Take the 2018 Developer Survey Linked 7 URL to open facebook app in android 7 Android - Facebook Intent to visit a certain Facebook page? 0 Open facebook page in App not the browser 0 open Facebook with Intent and url facebook 20 Open Facebook Page in Facebook App (if installed) on Android 16 Opening facebook app on specified profile page 21 Open Google Plus Page Via Intent In Android 10 Open facebook page from android app (in facebook version > v11) 10 how to open Facebook app from url only if installed 2 Cannot see like option in facebook page from android device see more linked questions Related 2805Close/hide the Android Soft Keyboard2936Why is the Android emulator so slow? How can we speed up the Android emulator?2132Is there a unique Android device ID?355Design for Facebook authentication in an iOS app that also accesses a secured web service687Android error: Failed to install *.apk on device *: timeout55Open a facebook link by native Facebook app on iOS2924Proper use cases for Android UserManager.isUserAGoat()?61Open link to Facebook page from iOS app14How to detect if Facebook app is installed on iOS?1493How does Facebook disable the browser's integrated Developer Tools? Hot Network Questions The use of T[] as a template parameter Unknown notation relating to stoichiometry Why would extra fuel be needed to de-orbit the ISS (if it comes to that)? What makes the Mauritius Passport so valuable? Long term effects of erosion How much smaller were medieval farm animals in England than today? Excluding files like web.config when using publishing in VS 2017 What are good words to refer to the condition of objects? When reading papers, what's the most convenient way to check a citation without disrupting the reading process? How to show this matrix is positive semi-definite? How to determine the saturation level when an opamp schmitt trigger starts worknig? ssh - why can I login with partial passwords? Can working on a mobile app with bad reviews affect my career? How to avoid implicit type casts in PostgreSQL? Internal resistance of a battery How to measure small, spiky amounts of current? Is verifying ISOs downloaded from the official website worthwhile? What is the meaning of this small symbol on my mod card? ChemicalData returns the correct result for "Sulfuric" but an empty list for "Sulfuric Acid". (Like mentioned in another answer here) This is a full fledged working code currently live in one of my apps: public static String FACEBOOKURL = " public static String FACEBOOKPAGEID = "YourPageName"; //method to get the right URL to use in the intent 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 return "fb://facewebmodal/f?href=" + FACEBOOKURL; } else { //older versions of fb app return "fb://page/" + FACEBOOKPAGEID; } } catch (PackageManager.NameNotFoundException e) { return FACEBOOKURL; //normal web url } } This method will return the correct url for app if installed or web url if app is not installed. "Daily Express" is a registered trademark. –Hammad Nasir Oct 7 '17 at 18:19 add a comment up vote 21 down vote this is the simplest code for doing this public final void launchFacebook() { final String urlFb = "fb://page/"+yourpageid; Intent intent = new Intent(Intent.ACTIONVIEW); intent.setData(Uri.parse(urlFb)); // If a Facebook app is installed, use it. To opening facebook app on specified profile page, you can do this: String facebookId = "fb://page/ "; startActivity(new Intent(Intent.ACTIONVIEW, Uri.parse(facebookId))); Or you can validate when the facebook app is not installed, then open the facebook web page. Working. EDIT: since version (3002850) Facebook App do not support this way anymore, there's another way, check the response below from Jared Rummler. Any tips ? –Balaji Katika Feb 2 '17 at 17:44 add a comment up vote -1 down vote try { String[] parts = url.split("//www.facebook.com/profile.php?id="); getPackageManager().getPackageInfo("com.facebook.katana", 0); startActivity(new Intent (Intent.ACTIONVIEW, Uri.parse(String.format("fb://page/%s", parts[1].trim())))); } catch (Exception e) { startActivity(new Intent(Intent.ACTIONVIEW, Uri.parse(url))); } shareimprove this answer answered Sep 9 '17 at 17:56 John 113 add a comment up vote -2 down vote You can open the facebook app on button click as follows:- Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activitymain); this.findViewById(R.id.button1).setOnClickListener(new View.OnClickListener() { Override public void onClick(View v) { startNewActivity("com.facebook.katana"); } }); } public void startNewActivity( String packageName) { Intent intent = MainActivity.this.getPackageManager().getLaunchIntentForPackage(packageName); if (intent != null) { // we found the activity // now start the activity intent.addFlags(Intent.FLAGACTIVITYNEWTASK); startActivity(intent); } else { // bring user to the market // or let them choose an app? intent = new Intent(Intent.ACTIONVIEW); intent.addFlags(Intent.FLAGACTIVITYNEWTASK); intent.setData(Uri.parse("market://details?id="+packageName)); startActivity(intent); } } shareimprove this answer answered Feb 25 '14 at 11:49 Deepak Sharma 3,03223347 add a comment Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. You can change this preference below. How do I adjust my mobile push notifications from Facebook?Mobile push notifications are updates that appear when you're not actively using Facebook. Show more . shareimprove this answer answered Jan 2 '16 at 9:25 AndroidMechanic 14.2k84479 awesome, thanks –Nick Kovalsky Oct 22 '17 at 18:55 add a comment up vote 8 down vote This has been reverse-engineered by Pierre87 on the FrAndroid forum, but I can't find anywhere official that describes it, so it's has to be treated as undocumented and liable to stop working at any moment: Intent intent = new Intent(Intent.ACTIONVIEW); intent.setClassName("com.facebook.katana", "com.facebook.katana.ProfileTabHostActivity"); intent.putExtra("extrauserid", "123456789l"); this.startActivity(intent); shareimprove this answer edited Mar 16 '12 at 16:03 Ahmad Kayyali 6,776124281 answered Jan 27 '11 at 8:13 Jon Colverson 2,01211617 It stopped working, this solution doesn't work anymore. SEARCH CONNECT WITH US Find us on Facebook Follow us on Twitter Check us on Google+ Subscribe to our rss feed TODAY'S PAPER Tuesday, 9th January 2018 See today's front and back pages, download the newspaper, order back issues and use the historic Daily Express newspaper archive. For best results, connect to Wi-Fi before downloading. Just go to your page on Facebook in the browser, right click, and click on "View source code", then find the pageid attribute: you have to use pageid here in this line after the last back-slash: fb://page/pageID For example: Intent facebookAppIntent; try { facebookAppIntent = new Intent(Intent.ACTIONVIEW, Uri.parse("fb://page/1883727135173361")); startActivity(facebookAppIntent); } catch (ActivityNotFoundException e) { facebookAppIntent = new Intent(Intent.ACTIONVIEW, Uri.parse(" startActivity(facebookAppIntent); } shareimprove this answer edited Mar 27 '17 at 15:53 Fabio Turati 2,22851829 answered Mar 27 '17 at 15:16 Shahid 314 This only make sense for static apps. Open the browser Uri uri = Uri.parse(facebookUrl); startActivity(new Intent(Intent.ACTIONVIEW, uri)); } } catch (PackageManager.NameNotFoundException e) { // Facebook is not installed. However, it is worse for the same reason because other apps might also specify matching intent filters. How do I update my account using a text message (SMS)? If youve set up Facebook texts, you can send a text (SMS) to 32665 (FBOOK) to update your status and get notifications without using data. –Irshu Apr 19 '17 at 7:43 add a comment up vote 2 down vote To do this we need the "Facebook page id", you can get it : from the page go to "About". Loading. Express. If this doesn't solve your issue, let us know.View Full Article Share ArticleWas this information helpful?YesNo 5a02188284
facebook video call for imaccomo usar keylogger no facebookhow to stop getting app invites on facebookzara h m forever 21 facebookhow to make an account on facebook for a businesshow to appear as offline on facebook 2013hacker download facebookplugin compartir facebook twitter wordpresslearn to crack facebook passwordfacebook huckers

Revenir en haut

MessagePosté le: Mar 9 Jan - 18:13 (2018)    Sujet du message: Publicité

PublicitéSupprimer les publicités ?
Revenir en haut
Montrer les messages depuis:   
Poster un nouveau sujet   Répondre au sujet    Addict Corporation Index du Forum -> Secteur public -> Candidature Toutes les heures sont au format GMT + 1 Heure
Page 1 sur 1

Sauter vers:  

Index | Panneau d’administration | Creer un forum | Forum gratuit d’entraide | Annuaire des forums gratuits | Signaler une violation | Conditions générales d'utilisation
Powered by phpBB © 2001, 2018 phpBB Group // DustyGreen Theme 1.0.2 By Gil
Traduction par : phpBB-fr.com