Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jun 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    3rd party integration through ning

    Hello,

    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 http://www.masterscoreboard.co.uk/Cl...entProfile.id; where is should be something like http://www.masterscoreboard.co.uk/Cl...uke%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!!

  • #2
    Regular Coder Lerura's Avatar
    Join Date
    Aug 2005
    Location
    Denmark
    Posts
    895
    Thanks
    0
    Thanked 118 Times in 117 Posts
    Code:
    <a id="JLink" href="">
    Code:
    <script>
    document.getElementById('JLink').href="http://www.masterscoreboard.co.uk/ClubIndex.php?CWID=2922&CUID=" + Ning.CurrentProfile.id;
    <script>


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •