This will actually publish on your wall the action with the object, if your user has provided the publish_actions permission.
For the permissions thing you would probably want to make sure you have the permission, so your check should look something like this: