Introduction: Open Graph is one of the core concept of facebook. It mainly deal with how you and entities in real word interact each other. Facebook shares user action (i.e. reading) with different objects (book, magazine)to the user’s timeline. In 2010, Facebook has introduced first version of Open graph, recently they have added Action Object model to open graph to extent Facebook experience.
At Space-O, we conducted a case study of implementing Open Graph Facebook Api in an iPhone application that deals with actions of users, below case study covers THREE areas, setting up FaceBook App, then creating & deploying PHP Code and Integrating the Facebook API in iPhone application.
Below are detailed steps:
Step 1) Managing Facebook app:
Step 2) Managing PHP object / code:
<head prefix=”og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#spaceospaceo:http://ogp.me/ns/fb/spaceospaceo#”>
<meta property=”fb:app_id” content=”341773732564103″ />
<meta property=”og:type” content=”spaceospaceo:cricket” />
<meta property=”og:url” content=”Put your own URL to the object here” />
<meta property=”og:title” content=”Sample Cricket” />
<meta property=”og:image” content=”https://sstatic.ak.fbcdn.net/images/devsite/attachment_blank.png” />
Step 3) Managing xcode implementation:
NSMutableDictionary *params = [[NSMutableDictionary alloc] initWithCapacity:1];
[params setValue:@”true” forKey:@”scrape”];
[params setValue:@”http://www.ennovata.com/wp-content/uploads/2011/12/testing.png” forKey:@”image”];
[params setValue:@”http://domainname.com/sports.php” forKey:@”testing”];
While doing the above steps please remember:
We have also tested the above implementation in Android Application and worked flawlessly, we had small challenges when it came to different devices, but then we found solutions around it.
If you have an iPhone / iPad (Apple iOS SDK) OR Android application that needs implementation on open graph feature, feel free to contact us for the same.
This case study was documented and contributed by Sunil Vaishnav, iPhone App Developer at Space-O Technologies and Tarun Patel took an initiative of implementing the same as Android App.
LET'S TALK VALIDATE YOUR IDEA!