function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
jthor@entransform.comjthor@entransform.com 

Facebook and VisualForce

Hi,

   

   I am building a a hybrid app using sencha touch and the  mobile SDK. Anyways I wanted to be able to to exceute method from sencha to my controller which in turn does some Facebook api calls. So I am using visual force remoting to call that method. Calling the method remotely works but when I try to do it call some facebook stuff it give me and error.

 

Visualforce Remoting Exception: line 13, column 1: ApexPages.currentPage() is null - Facebook API not supported Class.FacebookToken.getAccessToken: line 13, column 1

 I am using the  force.com tool kit for facebook http://wiki.developerforce.com/page/Getting_Started_with_the_Force.com_Toolkit_for_Facebook

 

here is the code 

@RemoteAction
    public static PageReference wallPost(string message){
    	FacebookPublish.postToWall(getAccessToken(), 'me', new Map<String, String>{'message' => message});
        return null;
    }

  btw I am extending the FaceBookLoginController since I am not mapping individual account to facebook account.