如何从iPhone SDK发布信息到Facebook墙? [英] How to post message to Facebook wall from the iPhone SDK?

查看:94
本文介绍了如何从iPhone SDK发布信息到Facebook墙?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是iPhone的新手。我的应用程序使用iPhone SDK连接到Facebook,我可以使用


@http://www.facebook。 com / connect / prompt_feed.php /?message = Hello


但在我的应用程序中,所有消息都显示在tableview上,我想发布在Facebook墙上选择的消息,将所选消息存储在Twitter消息(变量 twittermessage )中,并写入


@http://www.facebook.com/connect/prompt_feed.php/?message=%@,twittermessage;


但它会出现以下错误。


Objective-C
的静态实例NSString


我从

你所得到的错误消息是由于NSString的。这不是Facebook的错误。



为了在Facebook上发布消息,请使用以下代码

  [NSString stringwithFormat:@http://www.facebook.com/connect/prompt_feed.php/?message=%@,twittermessage]; 

然后使用此字符串作为URL发布消息的引用


I am new to iPhone. My application connects to Facebook using the iPhone SDK, and I can post a default message using

@"http://www.facebook.com/connect/prompt_feed.php/?message=Hello"

but in my application all messages display on tableview and I want to post the selected message on the wall of Facebook, store selected message in a Twitter message (variable twittermessage) and write

@"http://www.facebook.com/connect/prompt_feed.php/?message=%@",twittermessage;

But it gives the following error.

statically instance of Objective-C NSString

I used the iPhone Facebook SDk from How To Post on Facebook with your iPhone App.

解决方案

the error message you are getting is due to NSString. this is not an facebook error.

In order to post a message on facebook use the following code

[NSString stringwithFormat:@"http://www.facebook.com/connect/prompt_feed.php/?message=%@",twittermessage];

Then use this string as a reference for the URL to post a message

这篇关于如何从iPhone SDK发布信息到Facebook墙?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆