Posts

Showing posts from April, 2016

Move dns from Godaddy to AWS route53

1. Login on your aws console; Click on Route 53; Create Hosted Zone; Select your new created host title and click "Go to Record Sets", take note of the nameservers; 2.Login on your Godaddy account; Select your domain; Go to Nameservers and click SetNameservers; paste all the four you took from "Go to Record Sets" Route 53; 3. Now you can set new Cname or Arecord set in AWS Routes53

Get Facebook friends by Json request in Ruby on Rails

Below is the code to return all your facebook friends by passing oauth token:- response = Net::HTTP.get_response(URI("https://graph.facebook.com/v2.5/me/friends?access_token=#{oauth_token)}"))       unless response.is_a?(Net::HTTPSuccess)         return nil       end       json = ActiveSupport::JSON.decode(response.body)       json['summary']['total_count'].to_s  + ' Friends'

get facebook firends list clount by javascript SDK

<script>   // This is called with the results from from FB.getLoginStatus().   function statusChangeCallback(response) {     console.log('statusChangeCallback');     console.log(response);     // The response object is returned with a status field that lets the     // app know the current login status of the person.     // Full docs on the response object can be found in the documentation     // for FB.getLoginStatus().     if (response.status === 'connected') {       // Logged into your app and Facebook.         FbPostAPI();     } else if (response.status === 'not_authorized') {       // The person is logged into Facebook, but not your app.       document.getElementById('status').innerHTML = 'Please log ' +         'into this app.';     } else {       // The person is not logged into Facebook, so we're not sure if       // they are logged into this app or not.       document.getElementById('status').innerHTML = 'Pl