GLBasic forum

Main forum => GLBasic - en => Topic started by: Omadan on 2015-Mar-06

Title: Tweet
Post by: Omadan on 2015-Mar-06
Hi guys,

Is it possible to tweet from your program via GLBasic without exiting. People do not like their game to exit or lose focus when they tweet.

Your thoughts?
Title: Re: Tweet
Post by: MrPlow on 2015-Mar-06
Twitter auth setup is quite detailed. I have used Twitter to tweet from my bot using backend data collected from users but not using the auth required to allow access to tweet on users behalf.

You would need to create twitter app on the twitter website (which acts as your bot for tweeting)

Then theres a lot of libraries and keys required which allow user to sign in and auth your app to tweet on their behalf.

Title: Re: Tweet
Post by: Omadan on 2015-Mar-06
That all sounds great, but which command should be used from within GLBasic, I ask because Netwebend switches from application to default browser.

I would be really interested to make this work, this could be beneficial for everyone too, not just me.

Regards
Title: Re: Tweet
Post by: MrPlow on 2015-Mar-06
Hi

Build a pathloc$ string with querystring values etc.
then
tweet = NETWEBGET$("url.com",pathloc$,80,512,5000)

At the backend have your php file and libraries setup to what need on the php server side.

:-)
Title: Re: Tweet
Post by: spacefractal on 2015-Mar-07
better to uses api. due you need to known when a user is login and want to submit.

on Android, there is a SDK, but as im are aware inbuildt on iOS.

Currectly im have no time to implemenet them in near future.
Title: Re: Tweet
Post by: Omadan on 2015-Mar-22
Hi have tried and tried but can only make it work via NETWEBEND.
NETWEBGET$ gives me error 400 (bad request).

I can only make it work with NETWEBEND which calls your default browser.

I have no idea. Anyone?
Title: Re: Tweet
Post by: Omadan on 2015-Mar-23
Totally given up. Looked at many examples and they just work via Browser.

I think I'm going to have to use this via NETWEBEND.

What do you guys think of allowing player to tweet when he finishes the game, would it be that annoying? Remember that app will terminate / lose focus.

Thanks
Title: Re: Tweet
Post by: spacefractal on 2015-Mar-25
Im havent checked the tweet thing, but have not focus about at all currectly. On iOS its should been pretty easy, since the "sdk" is allready included in iOS. For Android, im guess TweetComposer is the best thing about it. Im havent have time in the near future to checkitout.

Howover you can also do a server based twitter using this one for web kits (which is my thinks is the best next thing):
https://dev.twitter.com/web/overview

If you do that, then NETWEBEND can been used to call the url you have used for setup twitter. This is property the easiest thing, when we talk about compatible.
Title: Re: Tweet
Post by: spicypixel on 2015-Mar-26
Lack of modern features is the reason why GLB is dying. Generally developers working on keeping GLB alive seemingly have a distinct distaste of anything facebook/twitter/social related. Which is why I guess they don't feel these features are important. These features are not only important they're paramount.

I am working on a title presently but it will be my last GLB title. I'm going to move onto new languages which support, social, IAP etc... out the box.
Title: Re: Tweet
Post by: erico on 2015-Mar-26
I recall Gernot did something to support social media I guess about last year.
But I also recall those media change their access/api/IĀ“dont know so much that it would require constant work with it to keep updated.
Title: Re: Tweet
Post by: spacefractal on 2015-Mar-26
its something im really not to seen in glbasic directly integrated.

Doing Facebook/Twitter integration will just breaks compatible with various other platforms, because only iOS and Android is supported for thier sdk. Other platforms would been out to been supported.  This is not a scope for glbasic. Compatibly and stability is more important.

Instead its better to extends the api in form of inline code directly, in same maner im did for inapp purchases for Ouya, Android and iOS for about 2 years ago (which im diddent have that big succes really). This is something im wont to do that in the near future. But others can freely do that, and that would nit require the source code at all (which is not module based, so integrating that directly in would been hard).

For Facebook, you can also do a Facebook page for that game, and simply link the Facebook page from the main game. Here uses NETWEBEND to call the Facebook page.

For Twitter im thinks its a similar matter, but here doing a serverbased app for the integration. Etc the app can send the twitter message using NETWEBEND, which from the server part could "resend" that message.

This is the best doing that for now for simple support. Mightbeen there exists a php based twitter integreation based on TweetComposer?
Title: Re: Tweet
Post by: MrPlow on 2015-Mar-26
I am tweeting from my own bot account just fine - I haven't looked at tweeting from users account as that is where its gets complicated... back and forth authentication etc,

Title: Re: Tweet
Post by: Marmor on 2015-Mar-26
if anyone implement tweeting in glb  i have a new hero!
Title: Re: Tweet
Post by: Omadan on 2015-Mar-27
I need a hero too.
Title: Re: Tweet
Post by: spacefractal on 2015-Mar-27
In ios 6+, this can been used:
http://www.appcoda.com/ios-programming-101-integrate-twitter-and-facebook-sharing-in-ios-6/

On Android it's much more complicated. There is no integrated sdk as I'm aware of and the Facebook ask is not easy to works with. So except there is a easy way like the ios one I'm won't try it.

In anyway those newer integrated as commands, but more as functions Eventuelly.

So I'm still bet a php based server integration is best way for glbasic.

Title: Re: Tweet
Post by: Kitty Hello on 2015-Aug-14
I hosted a php based thing. Does it not work? Can anyone find the link to it?
Title: Re: Tweet
Post by: MrPlow on 2015-Aug-17
Quote from: Kitty Hello on 2015-Aug-14
I hosted a php based thing. Does it not work? Can anyone find the link to it?

Didn't know about this myself.

I just created an include for my hi-score capture php page and CURLed my tweets to my bot
My bot has tweeted nearly 5,000 times now.

Haven't got a way to make users tweet from their accounts except via leaving app to tweet.
Title: Re: Tweet
Post by: MrTAToad on 2015-Aug-17
The main problem is that Twitter et al dont make it easy to send a tweet from a non-web based application.  I have never found any instructions or proper details on how to do it.