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

Get help using Construct 2

Post » Sat Oct 22, 2016 5:24 pm

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!
B
11
S
3
Posts: 277
Reputation: 1,395

Post » Sat Oct 22, 2016 6:51 pm

use URLEncode(Variable)

Image

helloFacebook.capx
Image
B
65
S
23
G
7
Posts: 1,505
Reputation: 10,896

Post » Sat Oct 22, 2016 6:53 pm

@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 ?
B
11
S
3
Posts: 277
Reputation: 1,395

Post » Sat Oct 22, 2016 6:55 pm

@korbaach
YES, I suck, got it ;)
Thank you very very much!
Last edited by Radulepy on Sat Oct 22, 2016 7:31 pm, edited 1 time in total.
B
11
S
3
Posts: 277
Reputation: 1,395

Post » Sat Oct 22, 2016 7:10 pm

Radulepy wrote:YES..got it ;)


I'm glad to hear that.. :)

Code: Select all
"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"


so this is the link split into multiple lines..
If someone else needs help..just replace content in URLEncode brackets..with variable or text
Image
B
65
S
23
G
7
Posts: 1,505
Reputation: 10,896

Post » Sat Oct 22, 2016 7:33 pm

@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!
B
11
S
3
Posts: 277
Reputation: 1,395

Post » Sat Oct 22, 2016 7:58 pm

@korbaach
And another Question, does this "thing" with browser works good on Mobile Phone ?
B
11
S
3
Posts: 277
Reputation: 1,395


Return to How do I....?

Who is online

Users browsing this forum: AndreasR and 19 guests