Outlast Apps - Posts, Permissions, Actions


Facebook Wall Posts

To add Facebook wall posts from an app with Outlast Apps plugin you will have to first add the publish_actions permission (see all permissions) to the app’s custom auth scope. In the Outlast App Admin set it up as follows:

Custom auth scope: email,publish_actions

It is best practice to request publish_actions only when needed – not everything at once. For now, this has to be done manually using FB.ui, it is not built-in to OFW yet.

If the user has granted publish_actions, you can post to his/her wall like this:

// Make sure fbuser is available
	$this->baseapp->login();
// Perform post
	$this->zajlib->variable->fbuser->post("Additional post text.", "http://outlast.hu/the/url/to/share");

If you useĀ $this->zajlib->variable->oaappurl as the link, don’t forget to include http:. So a full example with oaappurl would be:

// Make sure fbuser is available
	$this->baseapp->login();
// Perform post
	$this->zajlib->variable->fbuser->post("Additional post text.", "http:".$this->zajlib->variable->oaappurl);

Requesting additional permissions

It is recommended to request additional permissions for a specific task when you actually need it instead of requesting everything all at once. This is easy with oa.accept().

oa.accept(function(){
  alert('You accepted the app');
},
function(){
  alert('You rejected the app');
}, 'publish_actions');

Instead of setting the Custom auth scope for the whole application (as described in the previous section), this code will only request the publish_actions permission when it is needed for this particular request.

For a list of all available permissions see Facebook’s documentation.

Open Graph actions

[todo: add docs, see relevant bc discussion (kapszula)]

Outlast Web & Mobile Development (c) 2019 | Privacy Policy |