【问题标题】:sharekit - posting link ot the wallsharekit - 将链接发布到墙上
【发布时间】:2011-03-17 14:04:01
【问题描述】:

我正在尝试在 Facebook 墙上发布链接。我的意思是我可以发布如下链接:http://domain.com,但我想做的是获取链接到 domain.com 的 TEXT。 当然,Facebook 不允许这样做,因此发布的结果不会是 LINK,而是 LINK。

我在 Mashable iphone RSS 阅读器中看到了这种行为。结果是FB墙上的链接标题标题。

此外,在此应用程序中,用户会看到空白文本字段,并且在其下方有将作为链接发布在 FB 墙上的标题。在它下面有标准消息:sent over xxx iphone App。

所以我的问题是: 1. 如何在 FB 上发布链接(我必须在 ShareKit 中找到的 FB API 中更改什么) 2. 如何获取正在发布的内容的标题并将其放在 facebook 对话框视图中的文本字段下。

SHKFacebook.m

if (item.shareType == SHKShareTypeURL)
{
    self.pendingFacebookAction = SHKFacebookPendingStatus;

    SHKFBStreamDialog* dialog = [[[SHKFBStreamDialog alloc] init] autorelease];
    dialog.delegate = self;
    dialog.userMessagePrompt = SHKLocalizedString(@"Enter your message:");
    dialog.attachment = [NSString stringWithFormat:
                         @"{\
                         \"name\":\"%@\",\
                         \"href\":\"%@\"\
                         }",


                         item.title == nil ? SHKEncodeURL(item.URL) : SHKEncode(item.title),
                         SHKEncodeURL(item.URL)
                         ];
    dialog.defaultStatus = [NSString stringWithFormat:@"%@ @ %@",item.title,[item.URL absoluteString]];

    dialog.actionLinks = [NSString stringWithFormat:@"[{\"text\":\"Get %@\",\"href\":\"%@\"}]",
                          SHKEncode(SHKMyAppName),
                          SHKEncode(SHKMyAppURL)];



    [dialog show];

}

谢谢你看这个, 升

【问题讨论】:

    标签: iphone facebook sharekit


    【解决方案1】:

    我对 ShareKit 不是很熟悉,因为我觉得它对于发布到 Facebook、Twitter 或电子邮件这样的简单任务来说太复杂了。因此我想出了我自己的库BMSocialShare。也许看看我的源代码可以给你一个提示,告诉你如何使用 ShareKit 实现你想要实现的目标:https://github.com/blockhaus/BMSocialShare/blob/dev/iOS/BMSocialShare/BMSocialShare/BMSocialShare.m

    【讨论】:

      猜你喜欢
      • 2012-05-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-11-24
      相关资源
      最近更新 更多