How do I SHARE SCORE on Facebook & Twitter?

Get help using Construct 2

Post » Sat Nov 21, 2015 2:12 am

Right said... but is there anyone hearing it?
B
18
S
2
Posts: 23
Reputation: 957

Post » Sat Nov 21, 2015 7:20 pm

https://github.com/Wizcorp/phonegap-fac ... /README.md

Here you go, the directions for a programmer to build a plugin for mobile versions. I am available for hire and Cranberrygames has already built a plugin for this which I have pointed out already. So the answers are there for those who choose to look it up.

https://developers.facebook.com/apps/as ... up/dialog/

Above is the website to create your developer.facebook.com game account. It walks you through screen by screen what to enter for information. Unless you have cranberries plugin the only available platform in the above dialog is web. Do not even try to choose anything except web without a plugin developer or Cranberrygames plugin. It will not work.

For some reason if the link doesnt work, go to developers.facebook.com and then click my apps. In this menu, the uppoer right side of the screen is a button called add new app. Click or touch this button to bring you to the create new app on Facebook dialog.

https://developers.facebook.com/docs/games

A detailed overview of how to create a game on Facebook. Again, avoid the non web discussions unless you have a third party plugin.
www.h1k3.tech

We are here for you!
B
87
S
22
G
16
Posts: 715
Reputation: 16,785

Post » Sun Nov 22, 2015 7:04 pm

I have the cranberry plugin, i have also the facebook plugin from scirra, nothing works, i don't know HOW TO PUBLISH to facebook because is no facebook tutorial explaining how to just share a score.........
B
37
S
15
G
7
Posts: 1,680
Reputation: 9,612

Post » Fri May 13, 2016 6:22 pm

@imothep85

Has anything been sorted out? I'm at a stage where I want to publish score to facebook and twitter..
B
13
S
2
Posts: 53
Reputation: 855

Post » Fri May 13, 2016 6:42 pm

I think simply you CAN'T post in facebook because they don't allow any method of automatic text insertion, since some months ago (or a year i dont know exactly)
B
19
S
6
G
2
Posts: 258
Reputation: 2,644

Post » Tue Aug 02, 2016 8:00 am

How are now? is it solve or not?
B
36
S
13
G
1
Posts: 88
Reputation: 3,101

Post » Tue Aug 02, 2016 9:19 am

Using the browser object and using the URLs provided by Facebook and Twitter will allow you to post and share whatever you want from your game.
Use the "Open URL in new window" action and provide the appropriate URL/message.
myVariable is a variable (possibly global) that value is either text or numbers.

For Twitter :
Code: Select all
"twitter://post?text=" & urlencode("My message with #hashtags and directed @twitterhandle and concatening " & myVariable & " as a value.")


For FaceBook
Code: Select all
"https://www.facebook.com/sharer/sharer.php?app_id=APP_ID_SECRET_KEY&sdk=joey&u=" & urlEncode("URL_THAT_SHARES_AND_IS_SET_IN_THE_FB_APP_TO_SHARE) & "&picture="& UrlEncode("URL_TO_YOUR_PICTURE_APP_IF_YOU_HAVE_SOME") &"&display=popup&ref=plugin&src=share_button&quote=My message with #hashtags and concatening " & myVariableValue & " as a value."


You have to know though that on iOS/some mobiles for this to work, you have to use the button plugin only that will count as a user action.
Using CSS it is possible to make the button invisible under/over a sprite and still have a good looking app, but this all depends on your program.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
289
S
112
G
94
Posts: 7,333
Reputation: 69,293

Post » Tue Aug 02, 2016 7:16 pm

This method works on android ?
B
5
Posts: 11
Reputation: 258

Post » Wed Aug 03, 2016 1:29 am

Thank you @Kyatric, i will try it this week. I'll let you know if it works

Question : Is it possible to share image based on URI without uploading to a server? I tried to share screenshot canvas URI but it doesn't work
B
36
S
13
G
1
Posts: 88
Reputation: 3,101

Post » Wed Aug 03, 2016 7:36 am

@manuelsanmartin: It does work on browser for Android. It should work for Android exported apps as well as long as you manage to get the Browser object to open to a distant URL as well.

@nikosurfing: As far as I'm aware, you have to set the metadata for facebook in order to share an image (the image is set in Facebook's page/application configuration).
The image HAS to be uploaded and set in the config, so URI won't likely cut it.
For Twitter, as far as I'm aware it is not doable through the URL/Browser/this method at all (neither URI or uploaded image).
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
289
S
112
G
94
Posts: 7,333
Reputation: 69,293

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: jorgmaquoi, piddlyPoo, TELLES0808, Yahoo [Bot] and 7 guests