By Gene Teigland on Saturday, 18 July 2015
Posted in Technical Issues
Replies 3
Likes 0
Views 546
Votes 0
Something is not quite working (or I'm making a mistake) as it concerns your API. Specifically trying to use the API for Add a Friend. I put in this code:

<?php require_once( JPATH_ROOT . '/administrator/components/com_easysocial/includes/foundry.php' );

// This will render the necessary javascripts on the page header.
Foundry::page()->processScripts();
?>

<a href="javascript:void(0);" data-es-friends-add data-es-friends-id="<?php echo $userId;?>">Add a Friend</a>


I got this code by looking at your API at:
http://stackideas.com/docs/easysocial/developers/html/followers

But it does not function. I can click on the link but it does not add the user... all it does is say "cancel this request". Also once added as I try... The same text stays. Just seems like some things are missing in the API docs. Perhaps if you can point me in the right direction Ill figure out the other issues.

Thanks
You need to also render the stylesheets since it will be used for the dialogs,


// We also need to render the styling from EasySocial.
$doc = Foundry::document();
$doc->init();
·
Saturday, 18 July 2015 14:14
·
0 Likes
·
0 Votes
·
0 Comments
·
I appreciate your response. However what Im trying to say is that the function that you shared in your API to embed data-es-friends-add does not work. WHen I click it shows a message but it does not actually do the request to add as a friend.
http://www.awesomescreenshot.com/image/417567/d9895c04d5affbfd942369e356d2eb2a
·
Sunday, 19 July 2015 07:08
·
0 Likes
·
0 Votes
·
0 Comments
·
You should refer to EasyBlog's theme files for generating this. See /components/com_easyblog/themes/wireframe/easysocial/friends.php
·
Sunday, 19 July 2015 14:23
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post