tags:

views:

41

answers:

1

Hello there,

I'm looking for a simple way to add a post to a user's wall when this one just allowed my application.

I have the publish_stream & status_update enabled in the below code.

'req_perms' => 'email,publish_stream,status_update'

Now I'm just looking how I could make a simple Wall post like "'username' is now using xxx application" or something along those lines. (or update their status)

Also, how can I get only the first name of my user to echo it on a page? I still couldnt figure it out.

Again, I'm new to this, and it's the only 2 things I cant figure out, so help would be really appreciated!

thanks alot

A: 

Try something like:

$result = $facebook->api(
    '/me/feed/',
    'post',
    array('access_token' => $this->access_token, 'message' => 'Playing around with FB Graph..')
);

Assuming you have acquired an access token correctly. To get their name you could use something like:

$me = $facebook->api('/me');
$name = $me['name'];
BeRecursive