How do I share score with facebook link?[BROWSER NOT PLUGIN]

  • Hi, I just discovered this usefull link -> http://donordigital.com/services/socialshare/ <-

    I am just wondering how can i inser a variable there in the text:

    for example :

    "https://www.facebook.com/dialog/feed?app_id=184683071273&link=www.google.com&picture=https%3A%2F%2Fpbs.twimg.com%2Fprofile_images%2F762369348300251136%2F5Obhonwa.jpg&name=GAME%20NAME&caption=%20&description=Your%20Highscore%20is%20%3A&redirect_uri=http%3A%2F%2Fwww.facebook.com%2F"

    I must add there a variable for example highscore, i've tried to put it like this

    "Your%20Highscore%20is%20"&highscore" ... "

    but after &highscore Construct doesn't take the link anymore, or it's not displayed.

    Just to know the code is like this:

    On "Facebook" button clicked -> Browser -> go tu Url "[the url above]"

    I think this is the easiest way to share on FB

    Thanks!

  • use URLEncode(Variable)

    helloFacebook.capx

  • korbaach But I think i can't integrate a variable there, as i said i need to integrate a variable in that url.

    A variable in another variable ?

  • korbaach

    YES, I suck, got it

    Thank you very very much!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • YES..got it

    I'm glad to hear that..

    "https://www.facebook.com/dialog/feed?app_id=184683071273&link="&
    URLEncode(Facebook_URL_to_share)&
    "&picture="&
    URLEncode(Facebook_image_location)&
    "&name="&
    URLEncode(Facebook_post_title)&
    "&caption=%20&description="&
    URLEncode(Facebook_post_content)&
    "&redirect_uri=http%3A%2F%2Fwww.facebook.com%2F"[/code:19awg72t]
    
    so this is the link split into multiple lines..
    If someone else needs help..just replace content in URLEncode brackets..with variable or text
  • korbaach

    I'm just asking have you ever done somehthing like this :

    For example give a player +100 coins if they share on facebook ?

    It's easy to do like

    On button click - > go to link

    -> give 100 coins

    But is any event so check if he also post it or it's impossible ?

    Thanks again for that help mate!

  • korbaach

    And another Question, does this "thing" with browser works good on Mobile Phone ?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)