Skip to main content

Posts

Showing posts with the label Face book

Coldfusion Facebook Graph API publish to your wall and your friends walls

In this tutorial we will learn by full coldfusion Graph API code example how to publish on your wall and your friends walls. This application uses new oauth authentication method. The code is divided into four files: we will first start with a file called index.cfm: <cfoutput>         <!--- Your FB application IDS --->       <cfset api_key = ""/>     <cfset secret_key = ""/>     <cfset appID = ""/>     <!--- create a connection to the fb graph cfc --->     <cfset graphCFC = createObject("component", "graph").init(#appID#, #api_key#, #secret_key#) />     <!--- If user is authenticated or his access token is set create a cookie --->        <cfif not isdefined("cookie.access_token") and isdefined("url.access_token")>         <cfset cookie.acce...

Authorization with Facebook Using Graph API and Coldfusion

Below is an alternative Coldfusion Facebook Authorization method to the earlier one that was published yesterday. This method is simpler and does not require much code. You should create two file, one that will redirect the user of your application to Facebook API to get authenticated and then authorized, the first file is below:     <!--- Your FB application IDS --->     <cfset api_key = "xxxxxxx"/>     <cfset secret_key = "xxxxxx"/>     <cfset appID = "xxxxxx"/>     <!--- Redirect to get authonticated and authrorized from facebook, in the redirect_uri you should write the url of your website where you want the user to be redirected after authroization --->    <cflocation url="https://graph.facebook.com/oauth/authorize?client_id=#appID#&redirect_uri=http://www.sms4all.info/fb/login1.cfm" addtoken="no"> The second coldfusion file is the main page where the user...

Implementation of Facebook Graph API in Coldfusion

Facebook has launched a new FB API called Graph that simplifies FB applications development, the new Graph API allows website owners to create Single Sign On (SSO) with Facebook and allow websites owners to be able to import a lot of users information but after their permissions. The code below written in Coldfusion gives an example on how to Create FB login/logout button and then how to retrieve the created cookie, and use it for further development:     <body>   <cfoutput>     <!--- Your FB application IDS --->     <cfset api_key = "XXXXXXXXXXXXX"/>     <cfset secret_key = "XXXXXXXXXXXXXX"/>     <cfset appID = "XXXXXXXXXXXXXX"/>     <!--- Facebook login/logout button --->     <p><fb:login-button perms="email,user_birthday" autologoutlink="true"></fb:login-button></p>     <!--- Facebook login/logo...

Facebook New Open Graph API F8

On the 21st of April on its 8th conference Facebook announced the launch of the new Facebook APT Open Graph which simplifies integration of personal websites and Facebook. The new Open Graph API is based on JSON platform. The Open Graph protocol enables any web page to become a rich object in a social graph. For instance, this is used on Facebook to enable any web page to have the same functionality as a Facebook Page. The new Graph API attempts to drastically simplify the way developers read and write data to Facebook. It presents a simple, consistent view of the Facebook social graph, uniformly representing objects in the graph (e.g., people, photos, events, and fan pages) and the connections between them (e.g., friend relationships, shared content, and photo tags).  

Why Attachment Doesn't Appear on Wall While Message appears when publish on Facebook Wall using stream.publish

When using stream.publish method some facebook application developers face a common problem which is that the message is appearing on the wall while the attachment argument which is used to post media stuff like images and videos does not appear. The main problem behind this is the format of the attachment array, you should make sure that you wrote the array in the correct way, some tips are below: If you are using .Net or Coldfusion or another programming language the format of the array and array of array is not the same so you have in some languages to replace the single quotation( ' ) with double ( " ). The array is presented in some language with brace ({}) and array of array is ([{}]) So for the below example in php: $attachment = array( 'properties' => array('Votes' => array( 'text' => 'Members Voted', 'href' => 'http://blog.abusalah.info/'), 'ratings' => '5 stars'), 'media' => ar...

The New Facebook Wall Publishing method Stream.publish

As recently facebook stopped supporting the feedstory publishing method to publish news on users wall and application developers from now on can't create feed templates. Facebook released a new methods to do so which are: FB.Connect.streamPublish stream.publish Facebook.streamPublish I figured out those new methods when I was building a new facebook application yesterday to predict who will win the soccer match between Egypt and Algeria tonight. It took me sometime to succeed in publishing the story on the wall, so I will share with you my experience and how I solved it out in Coldfusion. As I build my applications using the work of Andrew Duckett who created the Facebook Rest Client Component , I will start from FacebookFBMLCLient.cfc file which contains the methods that communicates with facebook APIs. As I have used one of the three methods above which sounded the best as I guess, this example will be based on stream.publish method. The first step is to add the following method...

Google adsense on Facebook application

Google has recently loosened its AdSense Terms of Service so publishers can run other contextual targeted ads along with Google AdSense, but the change may be because Google wants to run their ads in publishing vehicles alongside other advertisements (like the ads running within Facebook). Steve Rubel thinks that Google AdSense ads will soon be coming to the Facebook applications Google has been slowly rolling out, especially after the quote from Eric Schmidt in AdAge : “How will those developers get paid for those services? We would like to have our ads in those applications.” Would you like to see Google AdSense in Facebook Apps with the current FB applications publishing? First you should have a face book application with hosting service. Second you should have a google adsense account if you don't have one go to google and create one. Create adsense ads that you want to embed in your FB application(s). Put your adsense code in empty html page and add some keywords inside thi...

Publish on Facebook Wall Using JSON (FB application using Coldfusion)

To develop a success Facebook application and make your application popular you need to enable a story publishing on the wall of the members who uses your application. To do so in coldfusion what you have to do is to follow the tutorials by Gavin Vincent ( Using json and the Feed Preview Console ) In the tutorial by Gavin, to publish the story on your wall you have the member must publish the story by pressing on the publish story button, but how can you enforce members to publish the story to make your application more popular? It is so simple to do so, but how? First of all make your application, the form and the action, in the action page don't publish your application result, ask the user to press on a continue button, this button is the feedstory form, then when the user gets the JSON publish story popup window and press on publish he will be able to see the result, see the following code: <cfset json = '{"content": {"feed": {"template_id":...

Face Book Plugin Development 404 and 405 errors

When I was developing my first test Face Book plugin I had the following errors that annoyed me for a few hours until I figured out my mistake. 404 Error: Error while loading page from [App name] Received HTTP error code 404 while loading http://www.mywebserver.com/facebookapp There are still a few kinks Facebook and the makers of test are trying to iron out. We appreciate your patience as we try to fix these issues. Your problem has been logged - if it persists, please come back in a few days. Thanks 405 Error: Error while loading page from [App name] Received HTTP error code 405 while loading http://www.mywebserver.com/facebookapp There are still a few kinks Facebook and the makers of test are trying to iron out. We appreciate your patience as we try to fix these issues. Your problem has been logged - if it persists, please come back in a few days. Thanks Solution I figured out that the solution for this error is simple as I used to fill in the Canvas Callback URL in facebook applic...