The Ultimate Guide To Facebook Login Migration Using PHP SDK (v3.0.0)

Facebook is the world’s largest social network with more than 2 billion monthly active users. There are so many users because it is a convenient way for people to connect with friends. The login process is smooth and simple, which makes it very easy for users to sign up and log in.

That’s why different websites such as blogs, news outlets, businesses, organizations, etc. have been integrating Facebook Login into their website by using Facebook Login API. There are more than 500 million people who log into their apps or websites using the same credentials they use on Facebook. It just makes things easier for them and more importantly, it helps businesses build trust among their users by giving them the option to sign in via their existing Facebook account.

Never miss an update from us. Join 10,000+ marketers and leaders.

If you are doing a migration from v2.2.x to v3.0.0

You Need To Do the Following Changes.

  • Download SDK: https://github.com/facebook/facebook-php-sdk
  • Keep the two classes base_facebook.php and facebook.php with the certificate fb_ca_chain_bundle.crt
  • Include facebook.php in your PHP file.
  • If you’re currently using the PHP SDK (v2.2.x) for authentication, you will recall that the login code looked like this:
include_once("facebook.php"); OR include_once("base_facebook.php");
$facebook = new Facebook(…);
$session = $facebook->getSession();
if ($session) {
// proceed knowing you have a valid user session
} else {
// proceed knowing you require user login and/or authentication
}
  • The login code is now:
include_once("facebook.php");
$facebook = new Facebook(…);
$user = $facebook->getUser();
if ($user) {
// proceed knowing you have a logged in user who's authenticated
} else {
// proceed knowing you require user login and/or authentication
}

I hope you like this post and if you want to get such type of updates then please subscribe to our email. You can also visit our PHP/CakePHP portfolio page to see all our apps developed on PHP or CakePHP platform.

Facebook’s Free Call Service For US iPhone Users

Facebook recently announced that iPhone users could enjoy free calls in the US over Wi-Fi Messenger for iPhone. This new feature facilitates people from the United States that allow them to use the Facebook Messenger app to place voice calls with friends using their internet connection or Wi-Fi.

Never miss an update from us. Join 10,000+ marketers and leaders.

The feature comes as a “Free Call” button in the existing app and the users don’t have to update to take advantage of this feature.

A lot of users quoted “Free call feature is incredibly simple and useful”. But the app also requires the receiver to have Facebook’s stand-alone app installed on their phone.

If the app couldn’t sync with the receiver, the “Free Call” icon appears grey and marked out. The call features look and feel similar to conventional voice calls.

Besides the United States, Facebook has mentioned that they have started testing VoIP functionality in Canada.

I’ve worked with the team at Andolasoft on multiple websites. They are professional, responsive, & easy to work with. I’ve had great experiences & would recommend their services to anyone.

Ruthie Miller, Sr. Mktg. Specialist

Salesforce, Houston, Texas

LEARN MORE

Facebook has also added a voice message feature for the iPhone users. It enables the user to send recorded messages to their Facebook friends. It works similar to a text message, whereas the text is replaced by a bar recorded with the sender’s voice information.

Andolasoft- a leading iPhone application development company offers a comprehensive range of iOS solutions to our global customers. With expertise in HTML 5, CSS, iOS, iPhone SDK, and Cocoa framework, we develop stunning iPhone applications to reach a wider audience.

KurrentJobs The Awesome iPhone App To Manage Your Job Search

In this era of Industrialization, everyone is planning to build a company of their own and run a successful business.  But they’re going to need skilled employees to get their jobs done.

Job posting websites could really make their search easy, but with all the available job board options, both recruiters and job seekers are getting frustrated in looking for right choices.

Because job seekers can’t find the right choice of companies as per their skills and experience. As well as the recruiters are getting misled by recruiting consultants and end up with the wrong candidates.

Never miss an update from us. Join 10,000+ marketers and leaders.

As a solution to above problem, iPhone developers at Andolasoft have designed a simple and secure iPhone app named “kurrentJobs”. It acts as a social media job portal for both recruiters and job seekers. It allows individuals, startups and established companies to post jobs as per their requirements.

Jobs are categorized on the basis of skills, experience and on type of jobs like Full-time, Part-time and Freelance.

With this app recruiters can post or manage their job posts from anywhere and anytime. The app is secure with the integration of social plug-ins like Facebook and Twitter.

The app has provided links to recruiter sites and also integrated LinkedIn to help job seekers to apply for jobs. This app can access network communications and storage content on your mobile devices for easier use.

The app is FREE to download and install on your iPhone, from the Apple App store.

iTune

Within a short span of time, Andolasoft has now become one of the major mobile app development companies in USA

We’ve achieved success in developing iPhone apps as we use agile methodologies, innovative work environment supported by creative iPhone developers. For more information about our iPhone and iPad apps please visit iPhone application development page.

Facebook Integration in Rails3 using ‘omniauth’ gem

feature11. Create a Facebook Application by using your ‘Facebook Developer account’
2. Get the ‘App ID’ and ‘App Secret’ of your created application

Add following gems to your Gemfile

  • gem ‘omniauth’
  • gem ‘omniauth-facebook’

Run ‘bundle install’

Create a middleware file named ‘omniauth.rb’ in ‘config/initializers’ path

Rails.application.config.middleware.use OmniAuth::Builder do
provider :facebook, ENV['FACEBOOK_KEY'], ENV['FACEBOOK_SECRET'],
{:scope ≥ 'email, read_stream, read_friendlists, friends_likes, friends_status, offline_access, publish_stream'}
end

This will hold the facebook_app_key and facebook_secret_key with permissions

Set your custom callback url in routes

match '/auth/:provider/callback', :to ≥ 'sessions#create' match '/auth/failure', :to ≥ 'sessions#failure'

Write the following codes in the Sessions Controller

def create
auth_hash = request.env['omniauth.auth'] # Got The precise information from facebook
if  !auth_hash.nil?
@user = User.find_or_create_from_auth_hash(auth_hash)
self.current_user = @user
redirect_to '/'
end
end
def failure
flash[:notice] = "Sorry, but you didn't allow access to our app!"
redirect_to '/'
end

Write the following code in your view page. You can use a custom image for the Facebook like ‘facebook.png’.

<%=link_to image_tag('/images/facebook.png'),
"/auth/facebook" %>