Author Topic: looking for IOS twitter/facebook sharing  (Read 6779 times)

Offline kaotiklabs

  • Dr. Type
  • ****
  • Posts: 313
  • Spain is diferent
    • View Profile
Hi guys,

I´m looking for an easy way to wrap a twitter/facebook sharing library on an iPhone app.

I´m trying with this IOS third pary libraries:

ShareKit was my first target and nearly worked but the library seems not been updated anymore and is kinda buggy.
Socialize seems really good but must be compiled with flags -ObjC -all_load and is giving a lot of crashes and headaches.
My last try is using AddThis with no luck by the moment.

any of you had luck with another method?
Vote Cthulhu! Because the stars are right!!!!
Ia Ia Cthulhu F' tang!

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10814
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: looking for IOS twitter/facebook sharing
« Reply #1 on: 2013-Mar-13 »
*bump*
Can you test if these methods are an OK solution for mobile devices?
http://www.glbasic.com/main.php?site=gack_connect

On Windows, the twitter one works.

Offline Marmor

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 929
  • 96A285CC
    • View Profile
    • my youtube channel
Re: looking for IOS twitter/facebook sharing
« Reply #2 on: 2013-Mar-13 »
beware , twitter changed his api to rest api 1.1 .
old api works until end march and maybe 1-6 month later in some cases.
grrr..

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10814
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: looking for IOS twitter/facebook sharing
« Reply #3 on: 2013-Apr-11 »
I had a little time to play with GLBasic last night and I think I wrapped the twitter/facebook API for iOS properly.
Find the attached files. You have to use the .gbas file and calls. And then include the .mm file in your xcode project (where the main.m file already is).

Can someone test it? I had a horrible time with my certificates, again.

For non-iOS I added a silly wrapper, but I think we should netwebend with the proper URLs+text directly.
Please feel free to change all this.

Offline trucidare

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1377
  • Bachelor of Fail
    • View Profile
Re: looking for IOS twitter/facebook sharing
« Reply #4 on: 2013-Apr-11 »
Hi Phoo, nice work!
Native Social Support wrapped.
But do some Magic with memory - since llvm supports ARC you don't need all the retain and release garbage but the xcode project i made has no arc support.

MacBook Pro 2,2 GHz Core 2 Duo, 4 GB RAM, 160 GB HDD, 8600M GT
Core i3 - 3,07 GHz, 8 GB Ram, 2.5 TB HDD, Geforce GTX 260+ OC

Offline Jonás Perusquía

  • Mr. Polyvector
  • ***
  • Posts: 170
    • View Profile
    • Ditrabox
Re: looking for IOS twitter/facebook sharing
« Reply #5 on: 2013-Apr-12 »
nice :D
<HTML><BASIC><EC>
Be free and do good things

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10814
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
looking for IOS twitter/facebook sharing
« Reply #6 on: 2013-Apr-13 »
Trucidare. What do you mean? I don't understand it. I packed the mm file into the xcode project, not with require.

Offline matchy

  • Prof. Inline
  • *****
  • Posts: 1545
    • View Profile
Re: looking for IOS twitter/facebook sharing
« Reply #7 on: 2013-Apr-14 »
I have attempted to test but trying to work out the framework for iOS5 as this seems for iOS6.

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10814
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
looking for IOS twitter/facebook sharing
« Reply #8 on: 2013-Apr-14 »
Yes. I think every device that can have ios 5 will now have ios 6. why not?

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3955
    • View Profile
    • Space Fractal
Re: looking for IOS twitter/facebook sharing
« Reply #9 on: 2013-Apr-14 »
nope. You will force out iPad 1 users examle with lastest iOS was version 5. Anyway its should of course which iOS that is isntalled and then only uses functions if iOS6 is installed. So make sure to check iOS version first.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation and The beagle Jam.

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10814
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
looking for IOS twitter/facebook sharing
« Reply #10 on: 2013-Apr-14 »
This check is in. Also, for ios 5 you could use the netwebend alternative.

Offline matchy

  • Prof. Inline
  • *****
  • Posts: 1545
    • View Profile
Re: looking for IOS twitter/facebook sharing
« Reply #11 on: 2013-Apr-14 »
Social.Framework (Social/Social.h) seems to be available only for iOS6 but I am using xcode iOS5 which seems to have separate Facebook and Twitter frameworks. Although I added the framework anyhow but can't find the it in compile and note that I am only trying to test it.

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10814
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: looking for IOS twitter/facebook sharing
« Reply #12 on: 2013-Apr-27 »
Help. I get now:
Code: (glbasic) [Select]
2013-04-27 14:20:46.577 iPhone[563:4a0b] bool _WebTryThreadLock(bool), 0x23176bb0: Tried to obtain the web lock from a thread other than the main thread or the web thread. This may be a result of calling to UIKit from a secondary thread. Crashing now...
1   0x38c7a3b7 WebThreadLock
2   0x34c8106d <redacted>
3   0x34c81047 <redacted>
4   0x34b62661 <redacted>
5   0x34ce9295 <redacted>
6   0x34cebee1 <redacted>
7   0x34ceba85 <redacted>
8   0x34ce88f5 <redacted>
9   0x34ce84cb <redacted>
10  0x34ce816f <redacted>
11  0x34ce9383 <redacted>
12  0x34ceaea5 <redacted>
13  0x34ce88f5 <redacted>
14  0x34ce816f <redacted>
15  0x34ce8a97 <redacted>
16  0x34ce88f5 <redacted>
17  0x34ce84cb <redacted>
18  0x34ce816f <redacted>
19  0x34ce6233 <redacted>
20  0x34ce5b9b <redacted>
21  0x34bde03d <redacted>
22  0x34b6846d <redacted>
23  0x34c34bf5 <redacted>
24  0x48a2f iosSocialPostMessage
25  0x235fa0 __GLBASIC__::SocialFramework_Post(int, __GLBASIC__::DGStr, __GLBASIC__::DGStr, int)
26  0x168248 __GLBASIC__::MoreOptions()
27  0x182b28 __GLBASIC__::MainMenu(__GLBASIC__::Tgame&)
28  0x1c9160 __GLBASIC__::Editor()
29  0x1151d8 __GLBASIC__::__MainGameSub_()
30  0x5d634 iPhoneMain
31  0xa0f70 iPhoneMainThread

I think I have to run it in another thread. But how was that again?


Offline bigsofty

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 2747
    • View Profile
Cheers,

Ian.

“It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration.”
(E. W. Dijkstra)

Offline DaCarSoft

  • Community Developer
  • Mr. Polyvector
  • ******
  • Posts: 182
    • View Profile
Re: looking for IOS twitter/facebook sharing
« Reply #14 on: 2013-May-02 »
Hi!!!

I solved that problem in my wrappers using "PerformSelectorOnMainThread".

You can found an example here:

http://www.glbasic.com/forum/index.php?topic=6708.msg54085#msg54085

Hope this helps
"Si quieres resultados distintos... no hagas siempre lo mismo" - Albert Einstein.