Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Open Feint help for beginner
Started by mediakitchen Oct 23 2010 03:58 PM

- - - - -
39 replies to this topic
[TOPIC CONTROLS]
Page 2 of 2 1 2
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#26

peachpellen

[GLOBAL: userInfoPane.html]
peachpellen
  • Contributor

  • 365 posts
  • Guests

This is all REALLY hopeful; I'm going to get back into it now and, hopefully, get Facebook working.

I'll be back ^-^;
uid: 10144 topic_id: 3035 reply_id: 9518


[TOPIC: post.html]
#27

peachpellen

[GLOBAL: userInfoPane.html]
peachpellen
  • Contributor

  • 365 posts
  • Guests

Alright, I did all that - including fixing the fact it was NOT set to HTML5 (I hadn't seen this mentioned before now, I'm sure it was, but I mustn't have taken it in or the like) and sadly STILL no joy. Exact same result. (I've turned my phone off and on, uninstalled and reinstalled, etc.)

I get a login screen, I put in my user name and password, I get a grey screen, then white, then it goes back to my app, then grey, then white, then back to the app.

I'm really frustrated with it as I've copied the code across multiple times from that sample and I have re-entered my secret and key multiple times.

Is there anything else I could be missing?
uid: 10144 topic_id: 3035 reply_id: 9521


[TOPIC: post.html]
#28

peachpellen

[GLOBAL: userInfoPane.html]
peachpellen
  • Contributor

  • 365 posts
  • Guests

Annnnnnnnnd it is working >.<'

It seems like maybe it just took more than the "few minutes" for the changes to save at FB's end, it appears.
uid: 10144 topic_id: 3035 reply_id: 9522


[TOPIC: post.html]
#29

jstrahan

[GLOBAL: userInfoPane.html]
jstrahan
  • Corona Geek

  • 1,926 posts
  • Corona SDK

Good to hear peach as I'm getting ready to start adding in fb
uid: 7911 topic_id: 3035 reply_id: 9523


[TOPIC: post.html]
#30

jstrahan

[GLOBAL: userInfoPane.html]
jstrahan
  • Corona Geek

  • 1,926 posts
  • Corona SDK

I also finished my splash screen and optimized the code for it last night
To night I'm adding fb to the splash and some pretty's
uid: 7911 topic_id: 3035 reply_id: 9525


[TOPIC: post.html]
#31

Dotnaught

[GLOBAL: userInfoPane.html]
Dotnaught
  • Contributor

  • 370 posts
  • Corona SDK

I did replace all the info and it was working in my test app...until I tested it again recently. Then I rebuild the facebook demo app and it didn't work for me either. However, looking at the control panel as you suggested I see an application ID (oath) that is not used. The Ansca code calls for the Facebook API key and the secret, but not the app ID. Is this new?

I should also ask does it makes a difference if the secret and API key is in single or double quotes? (Ansca code uses single, tried both out of frustration and neither are working for me atm).
uid: 1560 topic_id: 3035 reply_id: 9524


[TOPIC: post.html]
#32

peachpellen

[GLOBAL: userInfoPane.html]
peachpellen
  • Contributor

  • 365 posts
  • Guests

jonbeebe - can you help me out with one more thing please?

I notice that with Doodle Dash!, and some other apps about the place, when one posts to Facebook there is also a message, like the normal "status" type post, above the Doodle Dash! stuff and that's where the score is mentioned.

Like;

Peach Pellen is playing X and just scored Y!

|-----| Random text linking to stuff
|_____|
comment - like - Z

That top line is what I've been trying to do, but I can't work out how - I tried using "status" and "message" under "name" and above "media" but wasn't able to get it going.

Can you help? I'm sure it's simple when you know how but I can't find the right documentation for help :(

Peach/
uid: 10144 topic_id: 3035 reply_id: 9563


[TOPIC: post.html]
#33

jonbeebe

[GLOBAL: userInfoPane.html]
jonbeebe
  • Contributor

  • 511 posts
  • Corona SDK

I actually had to do quite a bit of digging in the Facebook documentation to figure that one out.

In your connectHandler() function, towards the top look for this line:

local attachment = {...

Here's my code for Dungeon tap to give you an idea:

[blockcode]
local attachment = {
name="Download Dungeon Tap To Compete With Me",
caption="Think you can beat my score of " .. tostring(gameScore) .. "? I dare you to try!",
href="http://itunes.apple.com/us/app/dungeon-tap/id393526203?mt=8",
media= { { type="image", src="http://beebegamesonline.appspot.com/dungeontapnews/facebook90.png", href="http://itunes.apple.com/us/app/dungeon-tap/id393526203?mt=8" } }
}
[/blockcode]

You'd obviously replace the iTunes link and the icon image with your own, but from that code you can definitely get an idea how to structure your "attachment" json string.

name is the bold status title that appears at the top, and caption is the gray text to the right of the media icon.

Oh, and to get your iTunes link before your app is in the app store, just replace "dungeon-tap" with your app's name (spaces replaced with dashes "-"), then create your app in iTunes connect and it'll create an App ID for you. From there, replace everything between id and ?mt=8 with your App ID).
uid: 7849 topic_id: 3035 reply_id: 9566


[TOPIC: post.html]
#34

peachpellen

[GLOBAL: userInfoPane.html]
peachpellen
  • Contributor

  • 365 posts
  • Guests

Ahhhhhh, caption! Thank you. I shall have a go at this before getting into the Halloween activities planned for this evening.

Such a fast reply :D Most appreciated!
uid: 10144 topic_id: 3035 reply_id: 9567


[TOPIC: post.html]
#35

peachpellen

[GLOBAL: userInfoPane.html]
peachpellen
  • Contributor

  • 365 posts
  • Guests

Hmmmm, I had a brief poke and couldn't get it working - I tried replacing the caption line with this in case it was something to do with the score I'd gotten confused over, but this doesn't work either.

caption="This is a test!",

Beyond adding in that line, is there anything else I need to do? Any changes in other files or anything?

/rubs head

It's all quite confusing the first time around!
uid: 10144 topic_id: 3035 reply_id: 9569


[TOPIC: post.html]
#36

jonbeebe

[GLOBAL: userInfoPane.html]
jonbeebe
  • Contributor

  • 511 posts
  • Corona SDK

Captions really the only thing you need for that, did you check your syntax? Make sure there's a comma after the name line and all other lines, etc.?

That's the only thing I can think of really... Most of my problems with FB, after figuring out how to actually do it, has always been with simple syntax errors... Try copy/pasting my code exactly, and just replacing the values with your own and see if that works.
uid: 7849 topic_id: 3035 reply_id: 9570


[TOPIC: post.html]
#37

peachpellen

[GLOBAL: userInfoPane.html]
peachpellen
  • Contributor

  • 365 posts
  • Guests

Compiling to test right now. :)
uid: 10144 topic_id: 3035 reply_id: 9571


[TOPIC: post.html]
#38

peachpellen

[GLOBAL: userInfoPane.html]
peachpellen
  • Contributor

  • 365 posts
  • Guests

Erm, OK, maybe crossed wires ^-^;

What I wanted was to post as the text one would enter immediately after there name, as though they typed in their status box :)

This code for a caption is for some small grey text below the "name" on one's page, in your example, below "Download Dungeon Tap To Compete With Me"

Does that make sense? I'm trying to get it as the actual status.
uid: 10144 topic_id: 3035 reply_id: 9572


[TOPIC: post.html]
#39

jonbeebe

[GLOBAL: userInfoPane.html]
jonbeebe
  • Contributor

  • 511 posts
  • Corona SDK

Haha oops, my bad, forgot to include something (sorry about that).

ABOVE the attachment = {... line, add this:

[blockcode]
local scoreStatusMessage = "this is the status message"
[/blockcode]

Then, down below the "attachment = {..." line, look for something like this:

[blockcode]
local response = session:call{
message = scoreStatusMessage,
method ="stream.publish",
attachment = json.encode(attachment),
action_links = json.encode(action_links),
}
[/blockcode]

The "message = scoreStatusMessage" line is the one that handles the actual status posting message (where it looks like they wrote it), and the "attachment = json.encode(attachment)" line is the one that handles the rest of the stuff you already took care of.

Sorry about leaving that stuff out, the FB api is pretty confusing to me too, just been looking at my own source code because it took forever to figure out lol.
uid: 7849 topic_id: 3035 reply_id: 9574


[TOPIC: post.html]
#40

peachpellen

[GLOBAL: userInfoPane.html]
peachpellen
  • Contributor

  • 365 posts
  • Guests

It was my fault - I'm horrible at explaining things; particularly when I don't really "get" them ^-^;

Thanks again, I doubt I'll have time to get to all this tonight (I'm pretty slow still) as I only have 35 or so to eat and get ready, but Happy Halloween to you, and I'll post here later to hopefully say I've got it all working now ;)

Peach.
uid: 10144 topic_id: 3035 reply_id: 9576



[topic_controls]
Page 2 of 2 1 2
 
[/topic_controls]