有关"苹果"的50条推文见下文.我手上贴了关于Apple Inc.的积极匹配.他们在下面标记为1.
这里有几行:
1|“@chrisgilmer: Apple targets big business with new iOS 7 features http://bit.ly/15F9JeF ”. Finally.. A corp iTunes account!
0|“@Zach_Paull: When did green skittles change from lime to green apple? #notafan” @Skittles
1|@dtfcdvEric: @MaroneyFan11 apple inc is searching for people to help and tryout all their upcoming tablet within our own net page No.
0|@STFUTimothy have you tried apple pie shine?
1|#SuryaRay #India Microsoft to bring Xbox and PC games to Apple, Android phones: Report: Microsoft Corp... http://dlvr.it/3YvbQx @SuryaRay …Run Code Online (Sandbox Code Playgroud) 我有一个松弛实例,我是唯一的用户(到目前为止)。我正在尝试使用机器人帐户发布一条简单的“hello world”消息,因此该消息不会显示为来自我的帐户。
$url = "https://slack.com/api/chat.postMessage?token=xoxb-XXXXXX&channel=general&text=hello%20world";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, TRUE);
curl_setopt($ch, CURLOPT_NOBODY, TRUE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
$head = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
Run Code Online (Sandbox Code Playgroud)
当我使用xoxp-XXXXoAuth 令牌发布时,它效果很好,只不过它来自我的帐户。当我使用xoxb-XXXX令牌发帖时,我会收到"error": "not_in_channel"回复。我收到了chat:write:user用户范围错误 - 尽管我已向我的应用程序授予了所有 50 个权限。
如何设置我的 Slack 应用程序以允许从应用程序上的机器人帐户而不是从我的帐户进行此写入?