Skip to content

Instantly share code, notes, and snippets.

Created January 9, 2018 17:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/a070b3d51dd47b4b0ee4f345a35471aa to your computer and use it in GitHub Desktop.
Save anonymous/a070b3d51dd47b4b0ee4f345a35471aa to your computer and use it in GitHub Desktop.
How To Share A Page On Facebook Android App
********************
How To Share A Page On Facebook Android App >>>
********************
http://shurll.com/bzgkn
(Copy & Paste link)
********************
February 2013 (11). On Facebook version 13.0.0.13.14 –Jared Rummler Jul 23 '14 at 21:18 4 it did not work for me –angel Mar 10 '16 at 17:53 show 17 more comments up vote 33 down vote Is this not easier? For example within an onClickListener? try { Intent intent = new Intent(Intent.ACTIONVIEW, Uri.parse("fb://profile/426253597411506")); startActivity(intent); } catch(Exception e) { startActivity(new Intent(Intent.ACTIONVIEW, Uri.parse(" } PS. 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. EDIT: since version 11.0.0.11.23 (3002850) Facebook App do not support this way anymore, there's another way, check the response below from Jared Rummler. Maybe add you do intent.setPackageName("com.facebook.katana") to make sure no other apps are called. June 2013 (7). String facebookId = "fb://page/ "; String urlPage = " try { startActivity(new Intent(Intent.ACTIONVIEW, Uri.parse(facebookId ))); } catch (Exception e) { Log.e(TAG, "Application not intalled."); //Open url web page. Stack Overflow works best with JavaScript enabled .. How do I log out of Facebook?To log out of Facebook:Click at the top right of any Facebook pageSelect Log OutView Full Article Share ArticleWas this information helpful?YesNo. Home About wikiHow Jobs Terms of Use RSS Site map Log In Mobile view All text shared under a Creative Commons License. You may need to use a different code from 32655 (FBOOK), depending on your country and carrier.View Full Article Share ArticleWas this information helpful?YesNo. –Daniel Persson Sep 2 '16 at 16:38 2 Ok but does not bring me to a clean page where the user can make a like of my page easily. February 2014 (3). March 2015 (6). This is a functionality we generally use in most of our apps. 5 Select "see all" to get more sharing options in the sharing drop-down. August 2014 (2). December 2013 (4). April 2013 (13). Is this article up to date? Yes No Cookies make wikiHow better. December 2012 (19). Submit Already answered Not a question Bad question Other Tips Make sure you sync your Facebook account on Android in order to make sharing easy. December 2016 (3). If you've already installed the Facebook app, you can find a list of the permissions the app uses in your phone's Applications Manager, or by visiting the Play Store and clicking View details under Permissions.Android permission (what youll see on your Android)Examples of what we use this permission forRead your text messages (SMS or MMS)If you add a mobile phone number to your account, this allows us to confirm your mobile phone number automatically by finding the confirmation code that we send via text message (SMS).Download files without notificationThis allows us to improve the app experience by pre-loading News Feed content.Read/write your contacts These permissions allow you to import your phones contacts to Facebook and sync your Facebook contacts to your phone.Add or modify calendar events and send email to guests without owners knowledge This allows you to see your Facebook events in your phones calendar. September 2012 (19). By clicking or navigating the site, you agree to allow our collection of information on and off Facebook through cookies. Keep in mind that this list doesnt include all of the Android permissions we request or all of our uses of those permissions. Please keep in mind that standard messaging rates apply.When you want to.Send a text (SMS) with.Update your statusYour status (ex: What a great weekend)Get a one time password for FacebookOTPStart getting text notificationsSTARTStop getting text notificationsSTOPGet helpHELPNote: You can choose what you want to get notified about from your settings. July 2013 (10). 4 Click the share button in the top right. Otherwise, it will open Facebook in the browser 5a02188284
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment