I am trying to post something onto the user’s wall. However I keep getting this error.
TypeError: Error #1006: value is not a function.
at com.facebook.graph.core::AbstractFacebook/handleRequestLoad()
at com.facebook.graph.net::AbstractFacebookRequest/dispatchComplete()
at com.facebook.graph.net::AbstractFacebookRequest/handleDataLoad()
at com.facebook.graph.net::AbstractFacebookRequest/handleURLLoaderComplete()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete()
Here is the code:
public function PostToUserWall(userId:String, message:String, name:String, caption:String, description:String, link:String):void
{
var params: Object = new Object;
params.message = message;
params.name = name;
params.caption = caption;
params.description = description;
params.link = link;
params.picture = "www.something.com/something.png";
Facebook.api("/"+userId+"/feed", null, params, "POST");
}
I am trying to understand what this problem is. But somehow cant figure it out. Any help here?
It’s a bit of a challenge debugging with only a stack trace to go on. Posting code will improve the likelihood of somebody being able to help you. However, it looks to me like the callback
parameterfor your call to the Facebook API is not a function. I’d suggest you double check the parameters you’re passing in the API call.Edit:
The second parameter of the call to the facebook API should be a function which the API will execute when the result is returned. Try updating your code as follows: