looking for IOS twitter/facebook sharing

Previous topic - Next topic

kaotiklabs

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!

Kitty Hello

*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.

Marmor

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..

Kitty Hello

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.

trucidare

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

Jonás Perusquía

<HTML><BASIC><EC>
Be free and do good things

Kitty Hello

Trucidare. What do you mean? I don't understand it. I packed the mm file into the xcode project, not with require.

matchy

I have attempted to test but trying to work out the framework for iOS5 as this seems for iOS6.

Kitty Hello

Yes. I think every device that can have ios 5 will now have ios 6. why not?

spacefractal

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 - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

Kitty Hello

This check is in. Also, for ios 5 you could use the netwebend alternative.

matchy

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.

Kitty Hello

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?


bigsofty

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)

DaCarSoft

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.