Free wallscript with facebook API integeration

This facebook wallscript updates the user status in their facebook profile using facebook API and  also stores it in to the local database.This script is free to use in any of your commercial applications.Technologies Used are

  • Facebook api – javascript
  • jquery
  • php

facebook Facebook application should be created in the link   - https://developers.facebook.com/appsFacebook  App id  is required.It should be replaced in the index.php file.

index.php , retrive.php , insert.php is same as the post –  http://www.webtuts.info/webdevelopment/facebook-status-update-jquery/29/

Facebook integration:

Diffrent events are triggered in facebook during its intializations. Check - http://developers.facebook.com/

<script>
// inituializations
		  window.fbAsyncInit = function() {

		    FB.init({
		      appId      : 'app_id', // App ID
		      channelUrl : '//'+window.location.hostname+'/test/', // Path to your Channel File
		      status     : true, // check login status
		      cookie     : true, // enable cookies to allow the server to access the session
		      xfbml      : true  // parse XFBML
		    });

		    /////////////////////////////////////////////////////////////////////////////////////////////
		     FB.Event.subscribe('auth.authResponseChange', function(response) {
			    if (response && response.authResponse)
			    {

				  FB.api('/me', function(me){
				  if (me.email)
				  {
				      name=me.name;
				      profilelink="http://graph.facebook.com/" + me.id + "/picture";

				      $("#cover").fadeOut();

				  }
				  else
				  {	

				      alert("some error.Think you are updating the same status message again!");
				  }
				  })
			      }
		      });

		     FB.getLoginStatus(function(response) {
			    if (response.status === 'connected')
			    {
				   name=me.name;
				      profilelink="=http://graph.facebook.com/" + me.id + "/picture";

				  $("#cover").fadeOut();

			    }
				 else if (response.status === 'not_authorized') {
				   name=me.name;
				  profilelink="http://graph.facebook.com/" + me.id + "/picture ";

				  $("#cover").fadeOut();

			    } else
			    {
				  //not loged in
				  $("#cover").fadeIn();
			    }
			  });

		  };
</form>

Status Update Using Facebook Api:FB.ui method is used to post the data to the facebook.

 

<script>
 function update(status_msg)
{
		var body = status_msg;
		FB.api('/me/feed', 'post', { message: body }, function(response) {
		if (!response || response.error) {
		alert("error");
		} else {
		 alert("Your status has been updated in your facebook account also in this local database");
		}
		 });
 }
0saves
If you like this post, contribute us by sharing this in your network

, , ,

  • http://www.webtuts.info/webdevelopment/facebook-status-update-jquery/29/ Facebook like status update using JQUERY AJAX

    [...] UPDATED POST with Facebook Api integeration LINK: http://www.webtuts.info/webdevelopment/facebook-api-integeration/143/ [...]

  • http://twitter.com/YoungDudeSays Matthias

    you should fill in your app id in index.php (line 106)

  • Anonymous

    @disqus_QuVs0aY0Wn:disqus ya @twitter-84421649:disqus was correct. Sorry for the late reply.

Ver peliculas online