Support our Sponsors:

Go Back   Touch Arcade > Developer Discussion > Public Game Developers Forum

Reply
 
Thread Tools Display Modes
  #1  
Old 05-14-2013, 02:37 PM
Mr. 8-Bit Mr. 8-Bit is offline
Junior Member
iPad 2, OS 4.x
 
Join Date: Sep 2011
Posts: 8
Default a little facebook help please

Hey everyone, so we're getting ready to release our first game but we're having a little trouble with facebook. Every time we touch the facebook button, the game launches the FB app but goes straight to the users wall, even if you just search on the FB app. Now, if you go to our FB page on your computer, you can get to the page. I created a personal account with my work email and then created a company page (don't know if that helps). can anyone help us out, it's pretty much the only thing left to fix before submitting to apple and I'm FB illiterate
Reply With Quote
  #2  
Old 05-14-2013, 09:28 PM
DemonJim's Avatar
DemonJim DemonJim is offline
Developer
iPhone 4, iOS 6.x
 
Join Date: Nov 2010
Location: UK
Posts: 382
Default

I seem to remember the same issue with my Facebook button, think it might just be the Facebook app overrides the URL and just goes to their wall whatever.

So I bypass this in my game by launching Safari instead and going to my company fb page there, but this isn't ideal as they might not be signed in on Safari so I miss out on Likes. Am hoping someone who knows will reply to your question!

By the way you don't need a personal account to create a company page, although I remember one path does seem to suggest you might. I think linking it to a personal account is just one (permanent) option.
Reply With Quote
  #3  
Old 05-14-2013, 09:48 PM
DemonJim's Avatar
DemonJim DemonJim is offline
Developer
iPhone 4, iOS 6.x
 
Join Date: Nov 2010
Location: UK
Posts: 382
Default

By the way just in case you didn't know, there's a Facebook app called 'Pages.' which is great for doing company page admin stuff on the go. (Amazed they were allowed to call it that though, even with a dot at the end)

Strangely you can't use the normal Facebook app for signing in and posting to company pages (well, you can't when they're not linked to a personal account at least).
Reply With Quote
  #4  
Old 05-15-2013, 04:39 AM
MrLeQuack's Avatar
MrLeQuack MrLeQuack is offline
Developer
iPhone 4, OS 4.x
 
Join Date: Mar 2011
Location: In a car
Posts: 267
Default

Hey,
I assume you are talking about a like button?
First you must get your page id, you go to http://graph.facebook.com/yourpage
here is the code :
NSURL *fanPageURL = [NSURL URLWithString:@"fb://profile/yourID"];
//first it tries in the facebook app
if (![[UIApplication sharedApplication] openURL: fanPageURL]) {
//fanPageURL failed to open. Open the website in Safari instead
NSURL *webURL = [NSURL URLWithString:@"https://www.facebook.com/yourpagename"];
[[UIApplication sharedApplication] openURL: webURL];
}

hope it helps.
Cheers
Reply With Quote
  #5  
Old 05-15-2013, 08:56 AM
DemonJim's Avatar
DemonJim DemonJim is offline
Developer
iPhone 4, iOS 6.x
 
Join Date: Nov 2010
Location: UK
Posts: 382
Default

Quote:
Originally Posted by MrLeQuack View Post
Hey,
I assume you are talking about a like button?
First you must get your page id, you go to http://graph.facebook.com/yourpage
here is the code :
Code:
NSURL *fanPageURL = [NSURL URLWithString:@"fb://profile/yourID"];
//first it tries in the facebook app
if (![[UIApplication sharedApplication] openURL: fanPageURL]) {
    //fanPageURL failed to open.  Open the website in Safari instead
    NSURL *webURL = [NSURL URLWithString:@"https://www.facebook.com/yourpagename"];
    [[UIApplication sharedApplication] openURL: webURL];
}
hope it helps.
Cheers
Ah thanks MrLeQuack, that solves the prob (for me at least).

I think when I tried to do this originally I just didn't have enough likes to get a page name at the time so thought it was because of that. Not using FB personally and not wanting friends to spam all their friends asking for likes [for some random new page with no content] meant it took a few weeks to build it up and get enough likes naturally. Turns out I just wasn't using the right URL, so thanks again!
Reply With Quote
  #6  
Old 05-15-2013, 09:06 AM
MrLeQuack's Avatar
MrLeQuack MrLeQuack is offline
Developer
iPhone 4, OS 4.x
 
Join Date: Mar 2011
Location: In a car
Posts: 267
Default

Yeah, you must also have a few likes for a page name, forgot about that!
You are welcomed!
Reply With Quote
  #7  
Old 05-15-2013, 10:29 AM
DemonJim's Avatar
DemonJim DemonJim is offline
Developer
iPhone 4, iOS 6.x
 
Join Date: Nov 2010
Location: UK
Posts: 382
Default

Incidentally I just found out that this (apparently) is the correct URL to get the Twitter app to launch in the same way:

Code:
[NSURL URLWithString:@"twitter://user?screen_name=YourTwitterName"]
(not actually tested yet but will soon and report back if no joy)
Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Copyright 2012, TouchArcade.com, LLC.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Copyright 2008 - 2011, TouchArcade.com. Privacy Policy / DMCA Copyright Agent