Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

11/16/11

Updated Facebook Tutorial For iPhone Techority

Techority
About Corona Training Hire Me Pixel Slice Techority Store Peach s Blog Categories Search

The Future Of Techority Part 2

How To Stop Your App From Dimming/Standby

Follow Me

Apr

21
2011

Updated Facebook Tutorial For iPhone


Tutorials Add comments

The below code is used to post a message to your user s Facebook wall. This code was taken directly fro m the sample provided by Ansca I didn t create it and my only goal is to help out those of you who haven t been able to get wall posting to work from your iPhone apps since this latest update. My only minor alterations are to make this easy for you to copy and paste. It s messy, it s got unneeded chunks in it and it s by no means the best way of doing this however it works perfectly and at the end of the day I don t want to leave you guys hanging for a week while I try to find time to make a nice little snippet for you. (I will do that in time, just not right now.) Follow the steps; 1. Copy json.lua and TableView.lua from the Facebook sample. (Applications, Corona, Sample Code, Networking, Facebook.) Put them in your project folder. 2. Paste the below code into your project. 3. Ensure your project folder has an image in it called facebook.png 4. Change APP ID to your own APP ID. 5. Replace my Boyfriend Grade specs with your own message, url, image, etc. (Don t just me based on that app. Please.) ----------------------------------------------------------------FCBO AEOK ----------------------------------------------------------------- Fcbo Cmad - aeok omn lclfCmad oa bomn lclLGU =1 oa OOT lclSO_ILG=2 oa HWDAO lclPS_S =3 oa OTMG lclPS_HT =4 oa OTPOO lclGTUE_NO=5 oa E_SRIF lclGTPAFR_NO=6 oa E_LTOMIF ----------lclfn inpi Tbe ,lbl l e ) oa c o n al( ae, e l i lbl hnpi (lbl)ed f ae e n ae n l e =l e o 1 e l e l i f hn e - f ad eeec - o f ne

Donate Please consider making a small donation if my tutorials have helped you.

Peach s Blog

Corona Templates

techority.com/2011/04/21/updated-facebook-tutorial-for-iphone/

1/6

11/16/11
frkvi pis t)d o , n ar( o lclpei =" oa rfx " fri1lvld o =,ee o pei =pei . "t rfx rfx . \" ed n

Updated Facebook Tutorial For iPhone Techority


Techorit
Like 138 people like Techorit . on Facebook

pit pei . "". tsrn(). " =". tsrn()) rn( rfx . [ . otigk . ] . otigv i tp(v)= "al"te f ye = tbe hn pit pei . "") rn( rfx . { pital(v nl lvl+1) rnTbe , i, ee pit pei . "") rn( rfx . ed n ed n ed n ed n --------------------------------------------------------------lclfnto clFcbo (vn) oa ucin alaeok eet i ("eso"= eettp )te f ssin = vn.ye hn - eetpaei oeo:"oi" "oiFie" "oiCneld,"oot - vn.hs s n f lgn, lgnald, lgnacle" lgu" i eetpae ="oi"te f vn.hs lgn hn - Ei i lgnerr - xt f oi ro rtr eun ed n - Tefloigdsly aFcbo dao bxfrpsigt yu Fcbo Wl - h olwn ipas aeok ilg o o otn o or aeok al i fCmad= SO_ILGte f bomn = HWDAO hn fcbo.hwilg {cin"tempbih ) aeoksoDao( ato=sra.uls" ed n - RqettePafr ifrain(Bifrain - eus h ltom nomto F nomto) i fCmad= GTPAFR_NOte f bomn = E_LTOMIF hn fcbo.eus("ltom ) aeokrqet pafr" ed n - Rqettecretlge i ue' if - eus h urn ogd n srs no i fCmad= GTUE_NOte f bomn = E_SRIF hn fcbo.eus("e ) aeokrqet m" ed n - Ti cd pssapooiaet yu Fcbo Wl - hs oe ot ht mg o or aeok al i fCmad= PS_HT te f bomn = OTPOO hn lclatcmn ={ oa tahet nm ="eeoigaFcbo CnetapuigteCrn SK" ae Dvlpn aeok onc p sn h ooa D!, ln ="tp/dvlprasaoiecmfrm, ik ht:/eeoe.ncmbl.o/ou" cpin="ikcpin, ato Ln ato" dsrpin = "ooa SK fr dvlpn iS ad Adod ap wt te sm cd ecito Crn D o eeoig O n nri ps ih h ae oe bs., ae" pcue="tp/dvlprasaoiecmdm/ooa09.n" itr ht:/eeoe.ncmbl.o/eoCrn9x0pg, atos=jo.noe {{nm ="er Mr" ln ="tp/asaoiecm cin snecd( ae Lan oe, ik ht:/ncmbl.o" ) fcbo.eus("efins ) aeokrqet m/red" - Atraerqet - lent eus - *tnDsly if aotFcbo pafr - *j ipas no bu aeok ltom

S aad

S arav anan

A lice

A ldrich

S rikanth Redd A nd

N ate

RocketZoom

Archives N O S A J J M A M F J D N O 2011 2011 2011 2011 2011 2011 2011 2011 2011 2011 2011 2010 2010 2010

M Tweets RT @ J . @ # @M I ;) @M <:O ' # # I :S 2012. M :// . # ' .) M ' ^-^; (A /A HH # , I SDK # P A '

fcbo.eus("efe" "OT,atcmn ) aeokrqet m/ed, PS" tahet ed n - Ti cd pssamsaet yu Fcbo Wl - hs oe ot esg o or aeok al i fCmad= PS_S te f bomn = OTMG hn lclpsMg={ oa ots

- psigtepoo - otn h ht

techority.com/2011/04/21/updated-facebook-tutorial-for-iphone/

2/6

11/16/11
Gae" rd!,

Updated Facebook Tutorial For iPhone Techority

msae = " js gt m byred gae I soe " . tssoe . " o Byred esg I ut o y ofin rd! crd . etcr . % n ofin nm=Hwd yutikYUcmaet m?, ae"o o o hn O opr o e" cpin"e yu gaenwb dwlaigByredGaefryu ihn!, ato=Gt or rd o y onodn ofin rd o or Poe" ln=ht:/tnsapecmu/p/ofin-rd/d2577?t8, ik"tp/iue.pl.o/sapbyredgaei41992m=" pcue"tp/pahelncmb7.n" itr=ht:/ecple.o/g5pg

fcbo.eus("efe" "OT,psMg) aeokrqet m/ed, PS" ots ed n

- psigtemsae - otn h esg

-------------------------------------------------------------------------------------esi ("eus"= eettp )te lef rqet = vn.ye hn - eetrsos i aJO ojc fo teF sre - vn.epne s SN bet rm h B evr lclrsos =eetrsos oa epne vn.epne i (nteetiErr)te f o vn.sro hn rsos =jo.eoe eetrsos ) epne sndcd( vn.epne i fCmad= GTUE_NOte f bomn = E_SRIF hn sauMsaetxOjc.et=rsos.ae ttsesg.etbettx epnenm pital(rsos,"srIf" 3) rnTbe epne Ue no, pit "ae,rsos.ae) rn( nm" epnenm esi fCmad= PS_HT te lef bomn = OTPOO hn pital(rsos,"ht" 3) rnTbe epne poo, sauMsaetxOjc.et="ht Pse" ttsesg.etbettx Poo otd esi fCmad= PS_S te lef bomn = OTMG hn pital(rsos,"esg" 3) rnTbe epne msae, sauMsaetxOjc.et="esg Pse" ttsesg.etbettx Msae otd es le - Ukoncmadrsos - nnw omn epne pit "nnw cmadrsos") rn( Ukon omn epne sauMsaetxOjc.et="nnw ? ttsesg.etbettx Ukon " ed n es le - Ps Fie - ot ald sauMsaetxOjc.et="otfie" ttsesg.etbettx Ps ald pital(eetrsos,"otFie Rsos" 3) rnTbe vn.epne Ps ald epne, ed n esi ("ilg = eettp )te lef dao" = vn.ye hn - soDao rsos - hwilg epne pit "ilgrsos:,eetrsos ) rn( dao epne" vn.epne sauMsaetxOjc.et=eetrsos ttsesg.etbettx vn.epne ed n ed n ------------------------------------------------------------------------------------------------ NT: T cet a mbl ap ta itrcs wt Fcbo Cnet frt lg it - OE o rae oie p ht neat ih aeok onc, is o no Fcbo aeok - ad cet a nw Fcbo apiain Ta wl gv yu te "P ky ad - n rae e aeok plcto. ht il ie o h AI e" n "plcto sce" apiain ert - ta sol b ue i tefloiglns - ht hud e sd n h olwn ie: lclapd ="00000" oa pI 000000 - Ad yu ApI hr i qoe - d or p D ee n uts

lclaie =nl oa pKy i - Ntnee a ti tm - o edd t hs ie techority.com/2011/04/21/updated-facebook-tutorial-for-iphone/

3/6

11/16/11 lclaie =nl oa pKy i


i (apd)te f pI hn

Updated Facebook Tutorial For iPhone Techority


- Ntnee a ti tm - o edd t hs ie

lclfnto psmmg(vn) oa ucin otys eet fCmad=PS_S bomn OTMG fcbo.oi(apd clFcbo,{pbihsra" ) aeoklgn pI, alaeok "uls_tem ed n lclfBto =dslynwmg (fcbo.n" oa butn ipa.eIae "aeokpg) fBto. =10 butnx 0 fBto. =40 butny 2 lclru:netfBto)- Rmv ti ln i ntuigDrco oaGopisr(butn - eoe hs ie f o sn ietr fBto:dEetitnr"a" psmmg butnadvnLsee(tp, otys) ed n Then you re done! Build and test. This should work perfectly. (If you need help on the Facebook end check out the previous Facebook tutorial, now depreciated.) I know this is not a good tutorial, it s not even a real tutorial it s just to get those of you who are stuck at this point with Facebook up and going. On an important side note: For personal reasons, I may disappear for a few days sometime in the next few weeks. (I don t know when.) I would ask that if I am clearly not online (FB, Twitter, here, etc.) that you try not to email me if possible; I wont have access and so coming back to a bunch of emails could be a tad overwhelming. Thanks in advance for your understanding. I hope everyone has a happy and safe Easter and that although this tutorial is lousy as an actual tutorial that it will still help those of you waiting on Facebook posting to publish your app move forward now. Lastly, I know it s been a slow month with tutorials various things have effected this, both personal and professional and I hope that shortly this will change; but bear with me in the meantime I have some exciting stuff planned for the not too distant future. Peach Pellen
Like 8 people like this. Be the first of our friends.

Posted by Peach Pellen at 10:45 am

8 Responses to Updated Facebook Tutorial For iPhone


1.

NIck Nebelsky says:


June 2, 2011 at 6:12 am

Peach, My Basketball Stats is an app I hired a developer to do for me in XCode. Will I be able to use this code with that code? Or will I need to have an app that was developed entirely on Corona SDK?

2.

NIck Nebelsky says:


June 2, 2011 at 6:13 am

techority.com/2011/04/21/updated-facebook-tutorial-for-iphone/

And where do I put the code? What file?

4/6

11/16/11
And where do I put the code? What file?

Updated Facebook Tutorial For iPhone Techority

3.

Peach Pellen says:


June 2, 2011 at 6:49 am

Hi Nick, no you would need it in Lua, the language Corona uses. As to the Facebook code, in main.lua if you are not using Director, in any file that suits you if you are. Peach

4.

Chasrles Ragona says:


July 8, 2011 at 9:03 pm

Anyword on if Ansca has fixed this for Android yet?

5.

Peach Pellen says:


July 9, 2011 at 6:41 am

I believe in the latest daily build it might actually have been fixed; I can t be certain as I just woke up and have not yet had a chance to look at it properly but in the release notes for the latest build it appears it might have been addressed

6.

Phillip says:
July 30, 2011 at 11:22 am

How do we know our app ID before we submit our app to itunes? Thanks

7.

Peach Pellen says:


July 30, 2011 at 12:09 pm

When you create a page for it in iTunes Connect, but before uploading it, you get given an App ID. (You still have 3 months after that to upload it and still keep your chosen name, if that is your concern.) Make sense? Peach

8.

Phillip says:
July 30, 2011 at 12:44 pm

Thanks a lot Peach!

Leave a Repl
Name

Rahul Singh

(required)

E-mail

rahulsingh2k10@gmail.com

(required)

URI

Your Comment

techority.com/2011/04/21/updated-facebook-tutorial-for-iphone/

5/6

11/16/11

Updated Facebook Tutorial For iPhone Techority

You may use these HTML tags and attributes: < h e = " t t e " > < b r t t e " > < c o m t t e " > < > a rf" il=" ab il=" arn il=" b <lcqoect=" <ie <oe <e dttm=" <m <>< ct=" <tie <tog bokut ie"> ct> cd> dl aeie"> e> i q ie"> srk> srn>

Submit Comment
Notify me of followup comments via e-mail. You can also subscribe without commenting.

2011 Techority

Suffusion theme by Sayontan Sinha

techority.com/2011/04/21/updated-facebook-tutorial-for-iphone/

6/6

You might also like