Couple of small problems with this routine...
//! post
// \return TRUE/FALSE if social framework is available for this platform
FUNCTION SocialFramework_Post%: stype%, text$, url$, img_id_sprite% = -1
LOCAL rv% = FALSE
LOCAL img$ = PLATFORMINFO$("TEMP") + "/socialimg.png"
IF img_id_sprite >=0
SAVESPRITE img$, img_id_sprite%
ENDIF
?IFDEF IPHONE
rv% = iosSocialPostMessage(stype, text$, url$, img$);
?ELSE
// we're just doing NETWEBEND :(
NETWEBEND "http://www.glbasic.com/main.php?site=gack_connect&nonav=1"
rv = 1
?ENDIF
IF img_id_sprite >=0
KILLFILE img$
ENDIF
RETURN rv%
ENDFUNCTION
LOCAL img$ = PLATFORMINFO$("TEMP") + "/socialimg.png"
Tries to create an img$ with ..(temp folder)"//socialimg.png" with the latest GLB beta, which it fails at.
Also, if you use img_id_sprite% = -1 then this line again...
LOCAL img$ = PLATFORMINFO$("TEMP") + "/socialimg.png"
Creates a path to a file that will not be created. SAVESPRITE is never visited to create it.
And this line will then try to read it...
rv% = iosSocialPostMessage(stype, text$, url$, img$);
This is the routine patched...
//! post
// \return TRUE/FALSE if social framework is available for this platform
FUNCTION SocialFramework_Post%: stype%, text$, url$, img_id_sprite% = -1
LOCAL rv% = FALSE
LOCAL img$ // "" is OK as it's handled in the ObjC
IF img_id_sprite >=0
img$ = PLATFORMINFO$("TEMP") + "socialimg.png"
SAVESPRITE img$, img_id_sprite%
ENDIF
?IFDEF IPHONE
rv% = iosSocialPostMessage(stype, text$, url$, img$);
?ELSE
// we're just doing NETWEBEND :(
NETWEBEND "http://www.glbasic.com/main.php?site=gack_connect&nonav=1"
rv = 1
?ENDIF
IF img_id_sprite >=0
KILLFILE img$
ENDIF
RETURN rv%
ENDFUNCTION
Unfortunately though it does not solve my problems?
