hyperlink infosystem
Get A Free Quote

Want to Integrate Facebook in Your android Phone Application ? Then Let's dive in to know the Steps to integrate Facebook in any of your Android mobile app.

App Development

14
Mar 2016
3103 Views 3 Minute Read
integrate facebook in your android phone application
podcast

 Facebook is one of the largest and hottest social Media Platform connecting people at vast range . In today's date these social media gigs like Facebook , twitter , whatsapp , Insta has become a part of your day to day routine which not only keeps you connected with the world but also updates you with the surroundings news.


Today there are no of mobile apps asking to login with your Facebook credentials and to make it possible we need to integrate it with our android project. Amalgamating Facebook is quite an easy stuff when you need to workout with eclipse but when it comes to android studio it's not that easy bread to be swollen up.

 

Objective:

I am pretty sure that you'll get thousands of columns and technological blogs making you understand integration of FB with eclipse but very are the fewer blogs that not only guides you about android studio but also in depths you by the steps that makes it easy for developers as well as project trainees to integrate a huge social media platform popularly knows as “FB” and make their app worth using.


And the output you will receive is below Snapshot :



Step 1: Download Facebook SDK

First you need to download Facebook SDK and then import it into android studio.

Step 2: Creating Project

Now once you download Facebook SDK then you need to create a new fresh project in android Studio.

Step 3: Linking SDK

Now you Link up the FB SDK as abc project with your Demo app where you need to add module dependency for Facebook.

Step 4: Get Key and Value pair

Once you link up your FB SDK then you are liable to get Key Hash Value for your computer.

Key Hash Value : It is used as a security check for Facebook during login process.

To get Key Hash Value for your machine/computer just write the below code in onCreate() method of main Class:



Step 5: Create FB App

In order to get Facebook App ID we need to create an app on FB developer site .

For that redirect to developers site then, after login add new app and Give your application name.


Then choose your category and later on click to Confirm.



By this our app is created so now you can navigate to dashboard and the note your App Id.



for registration of Package & activity then go to Settings -> Click on Add Platform & select android



Now you Register your app package name & activity that utilizes FB sharing and add key hash values as explained in the above followed steps.


Step 6: Adding App Id

Now, just add up your App ID in file String. Xml of your Demo Project and then replace your app id in place of "your app_id".

Step 7: Make changes in Manifest File

Open up your Manifest files and add following credentials:





Adding of meta data in tag:


Adding New Activity:

 

Step 8: Facebook Login



Session.openActiveSession() method of session class in MainActivity.java is called to integrate facebook with your android app.






Step 9: Login Successful


since we are done with Facebook login in Android we need to handle onActivityResult() in Mainactivity.java




How to Fetch User Data From Facebook ?


Once login to facebook is done, Call () method of StatusCallback() is called where newMeRequest() method inside Call() would be executed .

 

After request executes , Callback is called that returns object of Graph User which returns friends from friend list that uses FB login for making request.

To get friends list details user_friends permission is required.



About Hyperlink Infosystem

It is one of the best app development India company that gives best ever solutions to many top app development companies for various platforms irrespective of the technology . Whatever the case may be Hyperlink always proves to cart best ever solutions satisfying its clients in all the manners. Contact us for better Solutions ..!

Hire the top 3% of best-in-class developers!

Harnil Oza is the CEO & Founder of Hyperlink InfoSystem. With a passion for technology and an immaculate drive for entrepreneurship, Harnil has propelled Hyperlink InfoSystem to become a global pioneer in the world of innovative IT solutions. His exceptional leadership has inspired a multiverse of tech enthusiasts and also enabled thriving business expansion. His vision has helped the company achieve widespread respect for its remarkable track record of delivering beautifully constructed mobile apps, websites, and other products using every emerging technology. Outside his duties at Hyperlink InfoSystem, Harnil has earned a reputation for his conceptual leadership and initiatives in the tech industry. He is driven to impart expertise and insights to the forthcoming cohort of tech innovators. Harnil continues to champion growth, quality, and client satisfaction by fostering innovation and collaboration.

Our Latest Podcast

Listen to the latest tech news and trends we have discovered.

Listen Podcasts
blockchain tech
blockchain

Is BlockChain Technology Worth The H ...

Unfolds The Revolutionary & Versatility Of Blockchain Technology ...

play
iot technology - a future in making or speculating
blockchain

IoT Technology - A Future In Making ...

Everything You Need To Know About IoT Technology ...

play

Feel Free to Contact Us!

We would be happy to hear from you, please fill in the form below or mail us your requirements on info@hyperlinkinfosystem.com

full name
e mail
contact
+
whatsapp
skype
location
message
*We sign NDA for all our projects.

Hyperlink InfoSystem Bring Transformation For Global Businesses

Starting from listening to your business problems to delivering accurate solutions; we make sure to follow industry-specific standards and combine them with our technical knowledge, development expertise, and extensive research.

apps developed

4500+

Apps Developed

developers

1200+

Developers

website designed

2200+

Websites Designed

games developed

140+

Games Developed

ai and iot solutions

120+

AI & IoT Solutions

happy clients

2700+

Happy Clients

salesforce solutions

120+

Salesforce Solutions

data science

40+

Data Science

whatsapp