ios – Facebook Messenger撰写预定义消息

ios – Facebook Messenger撰写预定义消息,第1张

概述我正在使用fb-messenger://撰写打开Facebook Messenger Composer,但我无法将预定义的消息放入作曲家. 有人知道参数吗? 您应该使用FBSDKShareKit通过messenger发送内容. 导入FBSDKShareKit #import <FBSDKShareKit.h> 创建内容和分享 FBSDKShareLinkContent *content = [[F 我正在使用fb-messenger://撰写打开Facebook Messenger Composer,但我无法将预定义的消息放入作曲家.

有人知道参数吗?

解决方法 您应该使用FBSDKShareKit通过messenger发送内容.

导入FBSDKShareKit

#import <FBSDKShareKit.h>

创建内容和分享

FBSDKSharelinkContent *content = [[FBSDKSharelinkContent alloc] init];content.contentURL = [NSURL URLWithString:@"http://www.url.com"];content.contentTitle = @"My link!";content.contentDescription = @"Check out my link!";[FBSDKMessageDialog showWithContent:content delegate:self];

您还需要将控制器符合FBSDKSharingDelegate

#pragma mark - FBSDKSharingDelegate- (voID)sharer:(ID<FBSDKSharing>)sharer dIDCompleteWithResults:(NSDictionary *)results {}- (voID)sharer:(ID<FBSDKSharing>)sharer dIDFailWithError:(NSError *)error {}- (voID)sharerDIDCancel:(ID<FBSDKSharing>)sharer {}

可用内容如下:

> FBSDKSharelinkContent> FBSDKSharePhotoContent> FBSDKShareVIDeoContent

总结

以上是内存溢出为你收集整理的ios – Facebook Messenger撰写预定义消息全部内容,希望文章能够帮你解决ios – Facebook Messenger撰写预定义消息所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1073907.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-26
下一篇 2022-05-26

发表评论

登录后才能评论

评论列表(0条)

保存