× Joomla Facebook Connect support forum

Topic-icon How to add link to the comment posting on a wall

Support Specialist
15 years 8 months ago #5310 by alzander
This link comes from the page that the comment came from. I'm not sure if Facebook lets you easily override this, as it could be used for 'bad' purposes. Ex. Someone comments on page A, but the link goes to page B which has bad content on it (malware, inappropriate content, etc).

If you can explain exactly what you're trying to do, it might help us come up with a good way to help you out.
The topic has been locked.
Active Subscriptions:

None
15 years 7 months ago #5425 by vsplash
I am not using comments module.

I am trying to customize setFacebookMessage () function in facebook.php .

function setFacebookMessage($message)
{
$facebookUpdateStatusMessage = $this->configModel->getSetting('facebook_update_status_msg');

if ($facebookUpdateStatusMessage && $message)
{
try
{
//$userId = self::getUserId(FALSE);
//$response = $this->api('/'.$userId.'/feed', array('message' => $message));
$response = $this->api('/me/feed', array('message' => $message));
#$fbClient->users_setStatus($message);
}
catch (JFBCFacebookApiException $e)
{
/*
Fatal error: Uncaught exception 'FacebookRestClientException' with message
'Updating status requires the extended permission status_update' in
.../com_jfbconnect/assets/facebook-api/facebookapi_php5_restlib.php:3007
*/
}
}
}


Here we are using $response = $this->api('/me/feed', array('message' => $message)); to pass the comments to facebook wall.

I am using like $response = $this->api('/me/feed', array('message' => $message , 'href' => $url ));
But its not working.
Suggest me to pass the url in this array.
The topic has been locked.
Support Specialist
15 years 7 months ago #5440 by alzander
Try using "link" instead of 'href". For more information on the values you can pass:
developers.facebook.com/docs/reference/api/post

Also, I'd suggest enabling the "Show Facebook API Errors on Front-End" setting so that you can see any error responses that Facebook comes back with. Also, you'll need to make sure that you already have the user's permission to post to their wall. This is usually granted at registration.

Good luck!
The topic has been locked.