Navigation Menu

Skip to content

brentscheidt/Force.com-Toolkit-for-Facebook

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

THis is the beta version of the Force.com toolkit for Facebook
For usage instructions, please check out the getting started guide.

http://wiki.developerforce.com/index.php/Getting_Started_with_the_new_Facebook_Toolkit


Sample code for publishing to Graph

private void postToWall() {
    
  Map<String,String> params = new Map<String,String>();
  params.put('message','Check out my message!!');
  params.put('name','Message name here');
  params.put('link','http://developer.force.com');
  params.put('description','Learn to develop in the cloud.');
  
  fp.postToWall(params);    
  
}         

private void postLike() {
  
  String objectId = '100001770009947_138772692858397';    
  fp.postLike(objectId);    
  
}  

private void postComment() {
  
  String objectId = '100001770009947_138772692858397';
  
  Map<String,String> params = new Map<String,String>();
  params.put('message','I love this stuff!');
  
  fp.postComment(objectId, params);    
  
}     
    
private void postLink() {
      
  Map<String,String> params = new Map<String,String>();
  params.put('link','http://developer.force.com');
  params.put('message','I hope you like this link.');
  params.put('name','DeveloperForce');
  params.put('caption','This is a great link!');
  params.put('description','This is my favorite site where.....');
  
  fp.postLink(params);    
  
}  

private void postNote() {
  
  Map<String,String> params = new Map<String,String>();
  params.put('message','Here is a cool note!');
  params.put('subject','I hope you really enjoy this note!');
  
  fp.postNote(params);    
  
}    
  
private void postEvent() {
      
  Map<String,String> params = new Map<String,String>();
  params.put('name','Dreamforce 2012');
  params.put('start_time','1272718027');
  params.put('end_time','1272718027');
  
  fp.postEvent(params);    
  
}  

private void postCheckin() {
      
  Map<String,String> params = new Map<String,String>();
  params.put('coordinates','"latitude":"27.2931025","longitude":"-82.5034311"');
  params.put('place','145996348751414'); // page id 
  params.put('message','Hey!! I just checked in!');
  params.put('tags','qwall');
  
  fp.postCheckin(params);    
  
}



Have fun!

Quinton
http://twitter.com/quintonwall

About

A collection of Apex classes and Visualforce pages for working with the Facebook social graph

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published