Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 08-15-2009, 04:27 AM   #1 (permalink)
Registered Member
 
Join Date: Aug 2009
Posts: 49
Default External RSS feed with FBConnect on iPhone

So here is what I am trying to do. I have a blog and an iPhone app which shows the topics of my blog entries via the rss-feed. Tapping a topic opens the corresponding blog entry in a web view. Inside the web view I have a button which offers the possibility to share the content vie e-mail or facebook. My question now is how to let the user post the content of the entry to his wall on facebook.

I have already implemented the fbconnect for iPhone SDK and pushing the button opens the fbconnect login dialog. I have also created a facebook app and implemented the following code in my iPhone app:

Code:
- (void)session:(FBSession*)session didLogin:(FBUID)uid { NSLog(@"User with id %lld logged in.", uid);

    FBFeedDialog* dialog = [[[FBFeedDialog alloc] init] autorelease];
    dialog.delegate = self;
    dialog.templateBundleId = XXXXXXXX;
    dialog.templateData = @"{\"key1\": \"value1\"}";
    [dialog show];
}
It opens and works just fine so far but only displays the text I have configured in the feed template on facebook. How do I tell fbconnect to publish the content of the opened blog entry to the users wall? Any help is highly appreciated!
schimanke is offline   Reply With Quote
Old 09-21-2009, 09:50 AM   #2 (permalink)
Registered Member
 
Join Date: Aug 2009
Posts: 49
Default

FYI:

I figured it out. The problem was not related to my code but to the JSON string that is sent to facebook. It contained some html tags that were not accepted. I removed them from the string and everything works fine.
schimanke is offline   Reply With Quote
Old 09-23-2009, 04:54 PM   #3 (permalink)
Project Manager
 
Join Date: Feb 2009
Location: India
Posts: 22
Default

Hi,

I am just learning to use Facebook for my app. Can you please let me know how to get this templateBundleId for letting the user post the content to his wall on facebook?

Quote:
Originally Posted by schimanke View Post
-----
Code:
- (void)session:(FBSession*)session didLogin:(FBUID)uid { NSLog(@"User with id %lld logged in.", uid);

    FBFeedDialog* dialog = [[[FBFeedDialog alloc] init] autorelease];
    dialog.delegate = self;
    dialog.templateBundleId = XXXXXXXX;
    dialog.templateData = @"{\"key1\": \"value1\"}";
    [dialog show];
}
-----
__________________
Thanks & Regards,
Svaths
Svaths is offline   Reply With Quote
Old 09-23-2009, 05:06 PM   #4 (permalink)
Registered Member
 
Join Date: Aug 2009
Posts: 49
Default

Quote:
Originally Posted by Svaths View Post
Hi,

I am just learning to use Facebook for my app. Can you please let me know how to get this templateBundleId for letting the user post the content to his wall on facebook?
You need to create a facebook-app at Login | Facebook to which your iPhone app will be linked. After creating the facebook-app you will be provided with the templateBundleId.
schimanke is offline   Reply With Quote
Reply

Bookmarks

Tags
blog, facebook, fbconnect, iphone, rss

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
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 354
22 members and 332 guests
ADY, Dani77, Duncan C, e2applets, Grinarn, HemiMG, Herbie, JasonR, keeshux, linkmx, macquitzon216, mer10, Monstertaco, prchn4christ, Promo Dispenser, Robiwan, sebasx, sly24, Touchmint, twerner, zulfishah
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,881
Threads: 89,228
Posts: 380,760
Top Poster: BrianSlick (7,129)
Welcome to our newest member, macquitzon216
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 01:38 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0