showNewsFeedDialog Method

This method displays the Facebook news feed submission dialog

intel.xdk.facebook.showNewsFeedDialog(parameters);

Platforms:

Events:

  • intel.xdk.facebook.dialog.complete: This event is fired upon completion of the dialog request.
  • intel.xdk.facebook.dialog.fail: This event is fired if Facebook attempted to log the user in during a dialog request, but the login failed.

Example:


//This allows the application to post to Facebook for the logged in user
document.addEventListener("intel.xdk.facebook.dialog.complete",function(e) {
        console.log("News Feed Event Returned");
        if (e.success == true) {
                console.log("News feed updated successfully");
        } 
},false);
var objParameters = {
        "picture":"http://fbrell.com/f8.jpg", 
        "name":"Facebook Dialog",
        "caption":"This is my caption",
        "description":"Using Dialogs to interact with users.",
        "link":"http://xdk.intel.com"
}
intel.xdk.facebook.showNewsFeedDialog(objParameters);
                                  
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.