View Full Version : 3rd party integration through ning

06-22-2012, 10:41 PM

I am currently using a social networking platform called ning which allows 3rd party integration through its API. I am using an image with the following HTML to the URL we want to take the members so they don't need to log in to my network and then the integrated network.

Unfortunately the Ning current profile.id is not being resolved in the resultant link. Please advise what I need to do to lookup the id to place it in the URL

<p><a target="_blank" href="http://www.masterscoreboard.co.uk/ClubIndex.php?CWID=2922&CUID=" + Ning.CurrentProfile.id;><img class="align-center" src="http://api.ning.com:80/files/M7gXkHZIDHwq8gqSGPB*mJgXeMrgbCLxRrFCWeD51perhPbNUqVSzExiD0ZJL5n1lwmX3szSZcFj*FvcI4Fvsg6ZoUUIW6fP/masterscoreboardnewone.jpg" width="174" /></a></p>
The resultant URL is www.masterscoreboard.co.uk/ClubIndex.php?CWID=2922&CUID=+Ning.CurrentProfile.id; where is should be something like www.masterscoreboard.co.uk/ClubIndex.php?CWID=2922&CUID=Luke%22Costello

I have been advised that the problem with the approach below is that I'm not invoking javascript anywhere, so Ning.CurrentProfile.id is being interpreted as a string. Apparently I'll need to have the html with the image and a blank anchor tag with an ID, then construct the url using javascript and then again using javascript, swap the newly created href variable into the anchor tag!?

Please help!!

06-22-2012, 11:35 PM
<a id="JLink" href="">

document.getElementById('JLink').href="http://www.masterscoreboard.co.uk/ClubIndex.php?CWID=2922&CUID=" + Ning.CurrentProfile.id;