{"id":3705,"date":"2023-12-10T11:03:29","date_gmt":"2023-12-10T03:03:29","guid":{"rendered":"http:\/\/www.ponybai.com\/?p=3705"},"modified":"2023-11-25T16:16:16","modified_gmt":"2023-11-25T08:16:16","slug":"apex-connect","status":"publish","type":"post","link":"http:\/\/www.ponybai.com\/?p=3705","title":{"rendered":"\u5728 Apex \u4e2d\u8fde\u63a5"},"content":{"rendered":"\n<p><a><\/a>\u5728 Apex \u4e2d\u4f7f\u7528 Connect \u5f00\u53d1\u81ea\u5b9a\u4e49\u4f53\u9a8c Salesforce\u7684\u3002Connect in Apex \u63d0\u4f9b\u5bf9 B2B Commerce \u7684\u7f16\u7a0b\u8bbf\u95ee\uff0c CMS \u6258\u7ba1\u5185\u5bb9\u3001Experience Cloud \u7ad9\u70b9\u3001\u4e3b\u9898\u7b49\u3002\u521b\u5efa Apex \u663e\u793a Chatter \u6458\u8981\u7684\u9875\u9762\uff0c\u53d1\u5e03\u5e26\u6709\u63d0\u53ca\u548c\u4e3b\u9898\u7684\u6458\u8981\u9879\u76ee\uff0c \u5e76\u66f4\u65b0\u7528\u6237\u548c\u7fa4\u7ec4\u7167\u7247\u3002\u521b\u5efa\u66f4\u65b0 Chatter \u7684\u89e6\u53d1\u5668 \u9972\u6599\u3002<\/p>\n\n\n\n<p><a><\/a>\u8bb8\u591a Connect REST API \u8d44\u6e90\u64cd\u4f5c\u90fd\u4ee5\u9759\u6001\u65b9\u6cd5\u7684\u5f62\u5f0f\u516c\u5f00 \u547d\u540d\u7a7a\u95f4\u4e2d\u7684 Apex \u7c7b\u3002\u8fd9\u4e9b\u65b9\u6cd5\u4f7f\u7528\u5176\u4ed6\u7c7b \u8f93\u5165\u548c\u8fd4\u56de\u4fe1\u606f\u3002\u547d\u540d\u7a7a\u95f4\u79f0\u4e3a<samp>ConnectApi<\/samp><samp>ConnectApi<\/samp><samp>ConnectApi<\/samp><em><a><\/a>\u5728 Apex \u4e2d\u8fde\u63a5.<\/em><\/p>\n\n\n\n<p><a><\/a>\u5728 Apex \u4e2d\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528 SOQL \u67e5\u8be2\u8bbf\u95ee\u4e00\u4e9b Connect \u6570\u636e\uff0c\u5e76\u4e14 \u5bf9\u8c61\u3002\u4f46\u662f\uff0c\u5728\u7c7b\u548c\u6570\u636e\u4e2d\u516c\u5f00\u6570\u636e\u66f4\u7b80\u5355 \u5df2\u672c\u5730\u5316\u548c\u7ed3\u6784\u5316\u4ee5\u8fdb\u884c\u663e\u793a\u3002\u4f8b\u5982\uff0c\u4ee3\u66ff \u8fdb\u884c\u591a\u6b21\u8c03\u7528\u4ee5\u8bbf\u95ee\u548c\u7ec4\u5408\u6e90\uff0c\u60a8\u53ef\u4ee5\u505a\u5230\u8fd9\u4e00\u70b9 \u53ea\u9700\u4e00\u4e2a\u7535\u8bdd\u3002<samp>ConnectApi<\/samp><\/p>\n\n\n\n<p>\u5728 Apex \u65b9\u6cd5\u4e2d\u8fde\u63a5\u5728\u7528\u6237\u6267\u884c\u65b9\u6cd5\u7684\u4e0a\u4e0b\u6587\u4e2d\u6267\u884c\u3002\u4ee3\u7801\u6709 \u8bbf\u95ee\u4e0a\u4e0b\u6587\u7528\u6237\u6709\u6743\u8bbf\u95ee\u7684\u4efb\u4f55\u5185\u5bb9\u3002\u5b83\u4e0d\u4f1a\u78e8\u5408 \u7cfb\u7edf\u6a21\u5f0f\u4e0e\u5176\u4ed6 Apex \u4ee3\u7801\u4e00\u6837\u3002<\/p>\n\n\n\n<p>\u6709\u5173 Connect in Apex \u53c2\u8003\u4fe1\u606f\uff0c\u8bf7\u53c2\u9605\u00a0ConnectApi \u547d\u540d\u7a7a\u95f4\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Connect in Apex \u793a\u4f8b \u4f7f\u7528\u8fd9\u4e9b<strong>\u793a\u4f8b<\/strong><br>\u5728 Apex \u4e2d\u4f7f\u7528 Connect \u6267\u884c\u5e38\u89c1\u4efb\u52a1\u3002<\/li>\n\n\n\n<li><strong>Connect in<\/strong>\u00a0Apex \u529f\u80fd \u672c\u4e3b\u9898\u4ecb\u7ecd\u7528\u4e8e\u5904\u7406 Apex \u4e2d\u7684\u5e38\u89c1 Connect \u529f\u80fd<br>\u7684\u7c7b\u548c\u65b9\u6cd5\u3002<\/li>\n\n\n\n<li><strong>\u4f7f\u7528 ConnectApi \u8f93\u5165\u548c\u8f93\u51fa<\/strong>\u7c7b \u547d\u540d\u7a7a\u95f4\u4e2d\u7684\u67d0\u4e9b\u7c7b<br>\u5305\u542b\u8bbf\u95ee Connect REST API \u6570\u636e\u7684\u9759\u6001\u65b9\u6cd5\u3002\u547d\u540d\u7a7a\u95f4\u8fd8\u5305\u542b\u8981\u4f5c\u4e3a\u53c2\u6570\u4f20\u9012\u7684\u8f93\u5165\u7c7b\uff0c\u4ee5\u53ca\u8c03\u7528\u9759\u6001\u65b9\u6cd5\u8fd4\u56de\u7684\u8f93\u51fa\u7c7b\u3002<samp>ConnectApiConnectApi<\/samp><\/li>\n\n\n\n<li><strong>\u4e86\u89e3 ConnectApi<\/strong>\u00a0\u7c7b\u7684\u9650\u5236 \u547d\u540d\u7a7a\u95f4\u4e2d\u65b9\u6cd5\u7684\u9650\u5236\u4e0e\u5176\u4ed6 Apex \u7c7b<br>\u7684\u9650\u5236\u4e0d\u540c\u3002<samp>ConnectApi<\/samp><\/li>\n\n\n\n<li><strong>\u6253\u5305 ConnectApi<\/strong>\u00a0\u7c7b \u5982\u679c\u5728\u5305\u4e2d\u5305\u542b\u7c7b<br>\uff0c\u8bf7\u6ce8\u610f Chatter \u4f9d\u8d56\u5173\u7cfb\u3002<samp>ConnectApi<\/samp><\/li>\n\n\n\n<li>\u5e8f\u5217\u5316<strong>\u548c\u53cd\u5e8f\u5217\u5316 ConnectApi<\/strong>\u00a0\u5bf9\u8c61 \u5c06\u8f93\u51fa\u5bf9\u8c61<br>\u5e8f\u5217\u5316\u4e3a JSON \u65f6\uff0c\u5176\u7ed3\u6784\u7c7b\u4f3c\u4e8e\u4ece Connect REST API \u8fd4\u56de\u7684 JSON\u3002\u4ece JSON \u53cd\u5e8f\u5217\u5316\u8f93\u5165\u5bf9\u8c61\u65f6\uff0c\u683c\u5f0f\u4e5f\u7c7b\u4f3c\u4e8e Connect REST API\u3002<samp>ConnectApiConnectApi<\/samp><\/li>\n\n\n\n<li><strong>ConnectApi \u7248\u672c\u63a7\u5236\u548c\u76f8\u7b49\u6027\u68c0\u67e5<\/strong><br>\u7c7b\u4e2d\u7684\u7248\u672c\u63a7\u5236\u9075\u5faa\u4e0e\u5176\u4ed6 Apex \u7c7b\u7684\u89c4\u5219\u4e0d\u540c\u7684\u7279\u5b9a\u89c4\u5219\u3002<samp>ConnectApi<\/samp><\/li>\n\n\n\n<li><strong>\u5f3a\u5236\u8f6c\u6362 ConnectApi<\/strong>\u00a0\u5bf9\u8c61 \u5c06\u67d0\u4e9b\u8f93\u51fa\u5bf9\u8c61<br>\u4e0b\u6c89\u4e3a\u66f4\u5177\u4f53\u7684\u7c7b\u578b\u53ef\u80fd\u5f88\u6709\u7528\u3002<samp>ConnectApi<\/samp><\/li>\n\n\n\n<li>\u901a<strong>\u914d\u7b26\uff1a<\/strong><br>\u4f7f\u7528\u901a\u914d\u7b26\u5339\u914d Connect REST API \u548c Connect in Apex \u641c\u7d22\u4e2d\u7684\u6587\u672c\u6a21\u5f0f\u3002<\/li>\n\n\n\n<li><strong>\u6d4b\u8bd5 ConnectApi<\/strong>\u00a0\u4ee3\u7801 \u4e0e\u6240\u6709 Apex \u4ee3\u7801\u4e00\u6837\uff0cApex \u4ee3\u7801<br>\u4e2d\u7684 Connect \u9700\u8981\u6d4b\u8bd5\u8986\u76d6\u7387\u3002<\/li>\n\n\n\n<li><strong>ConnectApi \u7c7b\u4e0e\u5176\u4ed6 Apex<\/strong>\u00a0\u7c7b\u4e4b\u95f4\u7684\u5dee\u5f02 \u8bf7\u6ce8\u610f\u7c7b\u548c\u5176\u4ed6 Apex \u7c7b<br>\u4e4b\u95f4\u7684\u8fd9\u4e9b\u989d\u5916\u5dee\u5f02\u3002<samp>ConnectApi<\/samp><\/li>\n<\/ul>\n\n\n\n<h1 class=\"wp-block-heading\">\u5728 Apex \u4e2d\u8fde\u63a5\u793a\u4f8b<\/h1>\n\n\n\n<p>\u4f7f\u7528\u8fd9\u4e9b\u793a\u4f8b\u5728 Apex \u4e2d\u4f7f\u7528 Connect \u6267\u884c\u5e38\u89c1\u4efb\u52a1\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u4ece\u6e90\u4e2d\u83b7\u53d6\u6e90\u5143\u7d20 \u8c03\u7528\u65b9\u6cd5\u4ee5<strong>\u4ece\u6e90\u4e2d\u83b7\u53d6\u6e90<\/strong><br>\u5143\u7d20\u3002<\/li>\n\n\n\n<li>\u4ece\u5176\u4ed6\u7528\u6237\u7684\u6e90\u4e2d\u83b7\u53d6\u6e90\u5143\u7d20 \u8c03\u7528\u65b9\u6cd5\u4ee5<strong>\u4ece\u5176\u4ed6\u7528\u6237\u7684\u6e90\u4e2d\u83b7\u53d6\u6e90<\/strong><br>\u5143\u7d20\u3002<\/li>\n\n\n\n<li><strong>\u4ece\u6e90\u4e2d\u83b7\u53d6\u7279\u5b9a\u4e8e\u7ad9\u70b9<\/strong>\u7684\u6e90\u5143\u7d20 \u8c03\u7528\u4e00\u79cd\u65b9\u6cd5\u4ee5\u663e\u793a\u7528\u6237\u914d\u7f6e\u6587\u4ef6\u6e90\uff0c\u8be5\u6e90<br>\u4ec5\u5305\u542b\u8303\u56f4\u9650\u5b9a\u4e3a\u7279\u5b9a Experience Cloud \u7ad9\u70b9\u7684\u6e90\u5143\u7d20\u3002<\/li>\n\n\n\n<li>\u53d1\u5e03 Feed \u5143\u7d20 \u8c03\u7528\u4ee5\u53d1\u5e03\u00a0<strong>Feed \u5143\u7d20<\/strong><br>\u3002<\/li>\n\n\n\n<li><strong>\u53d1\u5e03\u5e26\u6709\u63d0\u53ca<\/strong><br>\u7684\u6e90\u5143\u7d20 \u8c03\u7528\u65b9\u6cd5\u6216\u4f7f\u7528 ConnectApiHelper \u5b58\u50a8\u5e93\u53d1\u5e03\u6e90\u3002<\/li>\n\n\n\n<li><strong>\u4f7f\u7528\u73b0\u6709\u6587\u4ef6<\/strong><br>\u53d1\u5e03\u6e90\u5143\u7d20 \u8c03\u7528\u65b9\u6cd5\u4ee5\u53d1\u5e03\u5305\u542b\u5df2\u4e0a\u4f20\u6587\u4ef6\u7684\u6e90\u5143\u7d20\u3002<\/li>\n\n\n\n<li><strong>\u53d1\u5e03\u5e26\u6709\u5185\u8054\u56fe\u50cf<\/strong><br>\u7684\u5bcc\u6587\u672c\u6e90\u5143\u7d20 \u8c03\u7528\u65b9\u6cd5\u6216\u4f7f\u7528 ConnectApiHelper \u5b58\u50a8\u5e93\u53d1\u5e03\u5305\u542b\u5df2\u4e0a\u4f20\u7684\u5185\u8054\u56fe\u50cf\u7684\u6e90\u5143\u7d20\u3002<\/li>\n\n\n\n<li><strong>\u53d1\u5e03\u5e26\u6709\u4ee3\u7801\u5757<\/strong><br>\u7684 RTF \u6e90\u5143\u7d20 \u8c03\u7528\u65b9\u6cd5\u4ee5\u53d1\u5e03\u5e26\u6709\u4ee3\u7801\u5757\u7684\u6e90\u5143\u7d20\u3002<\/li>\n\n\n\n<li><strong>\u53d1\u5e03\u5e26\u6709\u65b0\u6587\u4ef6\uff08\u4e8c\u8fdb\u5236\uff09\u9644\u4ef6<\/strong>\u7684\u6e90\u5143\u7d20<br>\u8c03\u7528\u65b9\u6cd5\u4ee5\u5c06\u6e90\u5143\u7d20\u4e0e\u65b0\u6587\u4ef6\u4e00\u8d77\u53d1\u5e03\u3002<\/li>\n\n\n\n<li>\u53d1\u5e03<strong>\u4e00\u6279\u6e90\u5143\u7d20<\/strong><br>\u4f7f\u7528\u89e6\u53d1\u5668\u8c03\u7528\u65b9\u6cd5\u4ee5\u6279\u91cf\u53d1\u5e03\u5230\u5e10\u6237\u7684\u6e90\u3002<\/li>\n\n\n\n<li><strong>\u4f7f\u7528\u65b0\uff08\u4e8c\u8fdb\u5236\uff09\u6587\u4ef6\u53d1\u5e03\u4e00\u6279\u6e90\u5143\u7d20<\/strong>\u00a0\u4f7f\u7528\u89e6\u53d1\u5668\u8c03\u7528\u65b9\u6cd5\u5c06\u65b0\u6587\u4ef6<br>\u6279\u91cf\u53d1\u5e03\u5230\u5e10\u6237\u7684\u6e90\u3002<\/li>\n\n\n\n<li>\u5b9a\u4e49\u64cd\u4f5c\u94fe\u63a5<strong>\u5e76\u4f7f\u7528\u6e90\u5143\u7d20<\/strong><br>\u53d1\u5e03 \u5728\u64cd\u4f5c\u94fe\u63a5\u7ec4\u4e2d\u521b\u5efa\u4e00\u4e2a\u64cd\u4f5c\u94fe\u63a5\uff0c\u5c06\u64cd\u4f5c\u94fe\u63a5\u7ec4\u4e0e\u6e90\u9879\u5173\u8054\uff0c\u7136\u540e\u53d1\u5e03\u6e90\u9879\u3002<\/li>\n\n\n\n<li><strong>\u5728\u6a21\u677f\u4e2d\u5b9a\u4e49\u64cd\u4f5c\u94fe\u63a5\u5e76\u4f7f\u7528\u6e90\u5143\u7d20<\/strong><br>\u53d1\u5e03 \u521b\u5efa\u64cd\u4f5c\u94fe\u63a5\u548c\u64cd\u4f5c\u94fe\u63a5\u7ec4\uff0c\u5e76\u4ece\u6a21\u677f\u5b9e\u4f8b\u5316\u64cd\u4f5c\u94fe\u63a5\u7ec4\u3002<\/li>\n\n\n\n<li>\u7f16\u8f91 Feed \u5143\u7d20 \u8c03\u7528\u65b9\u6cd5\u4ee5\u7f16\u8f91\u00a0<strong>Feed \u5143\u7d20<\/strong>\u3002<\/li>\n\n\n\n<li>\u7f16\u8f91\u95ee\u9898\u6807\u9898\u548c\u5e16\u5b50 \u8c03\u7528\u7528\u4e8e<strong>\u7f16\u8f91\u95ee\u9898\u6807\u9898\u548c\u5e16\u5b50<\/strong><br>\u7684\u65b9\u6cd5\u3002<\/li>\n\n\n\n<li><strong>Like a Feed<\/strong>\u00a0\u5143\u7d20 \u8c03\u7528\u4e00\u4e2a\u65b9\u6cd5\u6765 like a feed \u5143\u7d20\u3002<\/li>\n\n\n\n<li>\u4e3a\u6e90\u5143\u7d20\u6dfb\u52a0\u4e66\u7b7e \u8c03\u7528\u65b9\u6cd5\u4e3a<strong>\u6e90\u5143\u7d20<\/strong><br>\u6dfb\u52a0\u4e66\u7b7e\u3002<\/li>\n\n\n\n<li><strong>\u5171\u4eab\u6e90\u5143\u7d20\uff08V39.0 \u4e4b\u524d\u7684\u7248\u672c\uff09<\/strong><br>\u8c03\u7528\u65b9\u6cd5\u4ee5\u5171\u4eab\u6e90\u5143\u7d20\u3002<\/li>\n\n\n\n<li><strong>\u5171\u4eab\u6e90\u5143\u7d20\uff08\u5728\u7248\u672c 39.0 \u53ca\u66f4\u9ad8\u7248\u672c\u4e2d\uff09<\/strong><br>\u8c03\u7528\u65b9\u6cd5\u4ee5\u5171\u4eab\u6e90\u5143\u7d20\u3002<\/li>\n\n\n\n<li>\u53d1\u9001\u79c1\u4fe1 \u8c03\u7528\u7528\u4e8e<strong>\u53d1\u9001\u79c1\u4fe1<\/strong><br>\u7684\u65b9\u6cd5\u3002<\/li>\n\n\n\n<li>\u53d1\u8868\u8bc4\u8bba<br>\u8c03\u7528\u65b9\u6cd5<strong>\u53d1\u8868\u8bc4\u8bba<\/strong>\u3002<\/li>\n\n\n\n<li><strong>\u53d1\u5e03\u5e26\u6709\u63d0\u53ca<\/strong><br>\u7684\u8bc4\u8bba \u62e8\u6253\u7535\u8bdd\u6216\u4f7f\u7528 ConnectApiHelper \u5b58\u50a8\u5e93\u53d1\u5e03\u5e26\u6709\u63d0\u53ca\u7684\u8bc4\u8bba\u3002<\/li>\n\n\n\n<li><strong>\u4f7f\u7528\u73b0\u6709\u6587\u4ef6<\/strong><br>\u53d1\u8868\u8bc4\u8bba \u62e8\u6253\u7535\u8bdd\u4ee5\u4f7f\u7528\u5df2\u4e0a\u4f20\u7684\u6587\u4ef6\u53d1\u8868\u8bc4\u8bba\u3002<\/li>\n\n\n\n<li>\u4f7f\u7528\u65b0\u6587\u4ef6\u53d1\u5e03\u6ce8\u91ca \u8c03\u7528\u65b9\u6cd5\u4ee5<strong>\u4f7f\u7528\u65b0\u6587\u4ef6<\/strong><br>\u53d1\u5e03\u6ce8\u91ca\u3002<\/li>\n\n\n\n<li><strong>\u53d1\u5e03\u5e26\u6709\u5185\u8054\u56fe\u50cf<\/strong><br>\u7684\u5bcc\u6587\u672c\u6ce8\u91ca \u8fdb\u884c\u8c03\u7528\u6216\u4f7f\u7528 ConnectApiHelper \u5b58\u50a8\u5e93\u53d1\u5e03\u5305\u542b\u5df2\u4e0a\u4f20\u7684\u5185\u8054\u56fe\u50cf\u7684\u8bc4\u8bba\u3002<\/li>\n\n\n\n<li>\u53d1\u5e03\u5e26\u6709\u4ee3\u7801\u5757\u7684\u5bcc\u6587\u672c\u6e90\u6ce8\u91ca \u8c03\u7528\u65b9\u6cd5\u4ee5\u53d1\u5e03<strong>\u5e26\u6709\u4ee3\u7801\u5757<\/strong><br>\u7684\u6ce8\u91ca\u3002<\/li>\n\n\n\n<li>\u7f16\u8f91\u6ce8\u91ca \u8c03\u7528\u65b9\u6cd5\u4ee5<strong>\u7f16\u8f91\u6ce8\u91ca<\/strong><br>\u3002<\/li>\n\n\n\n<li><strong>\u9075\u5faa\u8bb0\u5f55<\/strong><br>\u8c03\u7528\u4e00\u79cd\u65b9\u6cd5\u6765\u8ddf\u8e2a\u8bb0\u5f55\u3002<\/li>\n\n\n\n<li>\u53d6\u6d88\u5173\u6ce8\u8bb0\u5f55 \u8c03\u7528\u505c\u6b62<strong>\u5173\u6ce8\u8bb0\u5f55<\/strong><br>\u7684\u65b9\u6cd5\u3002<\/li>\n\n\n\n<li><strong>\u83b7\u53d6<\/strong>\u5b58\u50a8\u5e93<br>\u8c03\u7528\u65b9\u6cd5\u83b7\u53d6\u5b58\u50a8\u5e93\u3002<\/li>\n\n\n\n<li><strong>\u83b7\u53d6<\/strong>\u5b58\u50a8\u5e93<br>\u8c03\u7528\u65b9\u6cd5\u83b7\u53d6\u6240\u6709\u5b58\u50a8\u5e93\u3002<\/li>\n\n\n\n<li>\u83b7\u53d6\u5141\u8bb8\u7684\u9879\u7c7b\u578b \u8c03\u7528\u65b9\u6cd5\u4ee5\u83b7\u53d6<strong>\u5141\u8bb8\u7684\u9879\u7c7b\u578b<\/strong><br>\u3002<\/li>\n\n\n\n<li><strong>\u83b7\u53d6<\/strong>\u9884\u89c8 \u8c03\u7528\u65b9\u6cd5\u4ee5\u83b7\u53d6\u6240\u6709\u652f\u6301\u7684\u9884\u89c8<br>\u683c\u5f0f\u53ca\u5176\u5404\u81ea\u7684 URL\u3002<\/li>\n\n\n\n<li>\u83b7\u53d6\u6587\u4ef6\u9884\u89c8 \u8c03\u7528\u65b9\u6cd5\u4ee5\u83b7\u53d6<strong>\u6587\u4ef6\u9884\u89c8<\/strong>\u3002<\/li>\n\n\n\n<li>\u83b7\u53d6\u5b58\u50a8\u5e93\u6587\u4ef6\u5939\u9879 \u8c03\u7528\u65b9\u6cd5\u4ee5\u83b7\u53d6<strong>\u5b58\u50a8\u5e93\u6587\u4ef6\u5939\u9879<\/strong><br>\u7684\u96c6\u5408\u3002<\/li>\n\n\n\n<li>\u83b7\u53d6\u5b58\u50a8\u5e93\u6587\u4ef6\u5939 \u8c03\u7528\u65b9\u6cd5\u83b7\u53d6<strong>\u5b58\u50a8\u5e93\u6587\u4ef6\u5939<\/strong>\u3002<\/li>\n\n\n\n<li><strong>\u83b7\u53d6\u6ca1\u6709\u6743\u9650\u4fe1\u606f<\/strong><br>\u7684\u5b58\u50a8\u5e93\u6587\u4ef6 \u8c03\u7528\u65b9\u6cd5\u4ee5\u83b7\u53d6\u6ca1\u6709\u6743\u9650\u4fe1\u606f\u7684\u5b58\u50a8\u5e93\u6587\u4ef6\u3002<\/li>\n\n\n\n<li><strong>\u83b7\u53d6\u5305\u542b\u6743\u9650\u4fe1\u606f<\/strong><br>\u7684\u5b58\u50a8\u5e93\u6587\u4ef6 \u8c03\u7528\u65b9\u6cd5\u4ee5\u83b7\u53d6\u5305\u542b\u6743\u9650\u4fe1\u606f\u7684\u5b58\u50a8\u5e93\u6587\u4ef6\u3002<\/li>\n\n\n\n<li><strong>\u521b\u5efa\u4e0d\u5e26\u5185\u5bb9\u7684\u5b58\u50a8\u5e93\u6587\u4ef6\uff08\u4ec5\u9650\u5143\u6570\u636e<\/strong>\uff09 \u8c03\u7528\u65b9\u6cd5\u4ee5\u5728 Google Drive \u5b58\u50a8\u5e93\u6587\u4ef6\u5939\u4e2d\u521b\u5efa\u4e0d\u5e26\u4e8c\u8fdb\u5236\u5185\u5bb9\uff08\u4ec5\u5143\u6570\u636e\uff09<br>\u7684\u6587\u4ef6\u3002<\/li>\n\n\n\n<li><strong>\u521b\u5efa\u5305\u542b\u5185\u5bb9<\/strong><br>\u7684\u5b58\u50a8\u5e93\u6587\u4ef6 \u8c03\u7528\u65b9\u6cd5\u4ee5\u5728 Google Drive \u5b58\u50a8\u5e93\u6587\u4ef6\u5939\u4e2d\u521b\u5efa\u5305\u542b\u4e8c\u8fdb\u5236\u5185\u5bb9\u7684\u6587\u4ef6\u3002<\/li>\n\n\n\n<li><strong>\u66f4\u65b0\u4e0d\u5e26\u5185\u5bb9\u7684\u5b58\u50a8\u5e93\u6587\u4ef6\uff08\u4ec5\u9650\u5143\u6570\u636e\uff09<\/strong><br>\u8c03\u7528\u65b9\u6cd5\u66f4\u65b0\u5b58\u50a8\u5e93\u6587\u4ef6\u7684\u5143\u6570\u636e\u3002<\/li>\n\n\n\n<li><strong>\u4f7f\u7528\u5185\u5bb9<\/strong><br>\u66f4\u65b0\u5b58\u50a8\u5e93\u6587\u4ef6 \u8c03\u7528\u65b9\u6cd5\u4ee5\u4f7f\u7528\u5185\u5bb9\u66f4\u65b0\u5b58\u50a8\u5e93\u6587\u4ef6\u3002<\/li>\n\n\n\n<li><strong>\u83b7\u53d6\u8eab\u4efd\u9a8c\u8bc1<\/strong>\u00a0URL \u8c03\u7528\u65b9\u6cd5\u4ee5\u83b7\u53d6\u8eab\u4efd\u9a8c\u8bc1 URL\u3002<\/li>\n<\/ul>\n\n\n\n<h1 class=\"wp-block-heading\">\u4ece Feed \u4e2d\u83b7\u53d6 Feed \u5143\u7d20<\/h1>\n\n\n\n<p>\u8c03\u7528\u65b9\u6cd5\u4ee5\u4ece\u6e90\u4e2d\u83b7\u53d6\u6e90\u5143\u7d20\u3002\u8c03\u7528\u00a0<samp>getFeedElementsFromFeed\uff08communityId\uff0c feedType\uff0c subjectId\uff09<\/samp>\u00a0\u83b7\u53d6 \u4e0a\u4e0b\u6587\u7528\u6237\u65b0\u95fb\u4e2d\u7684\u6e90\u5143\u7d20\u7684\u7b2c\u4e00\u9875 \u9972\u6599\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ConnectApi.FeedElementPage fep = ConnectApi.ChatterFeeds.getFeedElementsFromFeed(Network.getNetworkId(), ConnectApi.FeedType.News, 'me');<\/code><\/pre>\n\n\n\n<p>\u8be5\u65b9\u6cd5\u91cd\u8f7d\uff0c \u8fd9\u610f\u5473\u7740\u65b9\u6cd5\u540d\u79f0\u5177\u6709\u8bb8\u591a\u4e0d\u540c\u7684\u7b7e\u540d\u3002\u7b7e\u540d\u662f \u65b9\u6cd5\u53ca\u5176\u53c2\u6570\u7684\u987a\u5e8f\u3002<samp>getFeedElementsFromFeed<\/samp><\/p>\n\n\n\n<p>\u6bcf\u4e2a\u7b7e\u540d\u90fd\u5141\u8bb8\u60a8\u53d1\u9001\u4e0d\u540c\u7684\u8f93\u5165\u3002 \u4f8b\u5982\uff0c\u4e00\u4e2a\u7b7e\u540d\u53ef\u4ee5\u6307\u5b9a Feed \u7c7b\u578b\u548c\u4e3b\u9898 ID\u3002\u53e6\u4e00\u4e2a\u7b7e\u540d \u53ef\u4ee5\u5177\u6709\u8fd9\u4e9b\u53c2\u6570\u548c\u4e00\u4e2a\u9644\u52a0\u53c2\u6570\u6765\u6307\u5b9a \u8981\u4e3a\u6bcf\u4e2a Feed \u5143\u7d20\u8fd4\u56de\u7684\u6ce8\u91ca\u3002<\/p>\n\n\n\n<p>SiW\uff08\u7845\u74e6\uff09<\/p>\n\n\n\n<p>\u6bcf\u4e2a\u7b7e\u540d\u90fd\u64cd\u4f5c\u4e8e \u67d0\u4e9b Feed \u7c7b\u578b\u3002\u4f7f\u7528\u5bf9 \u64cd\u4f5c\u7684\u7b7e\u540d\u6765\u83b7\u53d6\u7ec4\u6e90\uff0c\u56e0\u4e3a\u7ec4\u662f\u4e00\u6761\u8bb0\u5f55 \u7c7b\u578b\u3002<samp>ConnectApi.FeedType.Record<\/samp><\/p>\n\n\n\n<h1 class=\"wp-block-heading\">\u4ece\u5176\u4ed6\u7528\u6237\u7684 Feed \u4e2d\u83b7\u53d6 Feed \u5143\u7d20<\/h1>\n\n\n\n<p>\u8c03\u7528\u65b9\u6cd5\u4ee5\u4ece\u5176\u4ed6\u7528\u6237\u7684\u6e90\u4e2d\u83b7\u53d6\u6e90\u5143\u7d20\u3002\u81f4\u7535 \u4ece\u5176\u4ed6\u7528\u6237\u7684 Feed \u5143\u7d20\u83b7\u53d6\u7b2c\u4e00\u9875 \u9972\u6599\u3002<\/p>\n\n\n\n<p><samp><samp>getFeedElementsFromFeed(communityId, feedType, subjectId)<\/samp><\/samp><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ConnectApi.FeedElementPage fep = ConnectApi.ChatterFeeds.getFeedElementsFromFeed(Network.getNetworkId(), ConnectApi.FeedType.UserProfile, '005R0000000HwMA');<\/code><\/pre>\n\n\n\n<p>\u8fd9 \u793a\u4f8b\u8c03\u7528\u76f8\u540c\u7684\u65b9\u6cd5\u4ece\u53e6\u4e00\u4e2a\u7528\u6237\u7684 \u8bb0\u5f55 \u9972\u6599\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ConnectApi.FeedElementPage fep = ConnectApi.ChatterFeeds.getFeedElementsFromFeed(Network.getNetworkId(), ConnectApi.FeedType.Record, '005R0000000HwMA');<\/code><\/pre>\n\n\n\n<p>\u8be5\u65b9\u6cd5\u91cd\u8f7d\uff0c \u8fd9\u610f\u5473\u7740\u65b9\u6cd5\u540d\u79f0\u5177\u6709\u8bb8\u591a\u4e0d\u540c\u7684\u7b7e\u540d\u3002\u7b7e\u540d\u662f \u65b9\u6cd5\u53ca\u5176\u53c2\u6570\u7684\u987a\u5e8f\u3002<samp>getFeedElementsFromFeed<\/samp><\/p>\n\n\n\n<p>\u6bcf\u4e2a\u7b7e\u540d\u90fd\u5141\u8bb8\u60a8\u53d1\u9001\u4e0d\u540c\u7684\u8f93\u5165\u3002 \u4f8b\u5982\uff0c\u4e00\u4e2a\u7b7e\u540d\u53ef\u4ee5\u6307\u5b9a Feed \u7c7b\u578b\u548c\u4e3b\u9898 ID\u3002\u53e6\u4e00\u4e2a\u7b7e\u540d \u53ef\u4ee5\u6709\u8fd9\u4e9b\u53c2\u6570\u548c\u4e00\u4e2a\u989d\u5916\u7684\u53c2\u6570\u6765\u6307\u5b9a\u6700\u5927\u6ce8\u91ca\u6570 \u8fd4\u56de\u6bcf\u4e2a\u6e90\u5143\u7d20\u3002<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">\u4ece Feed \u4e2d\u83b7\u53d6\u7279\u5b9a\u4e8e\u7f51\u7ad9\u7684 Feed \u5143\u7d20<\/h1>\n\n\n\n<p>\u8c03\u7528\u65b9\u6cd5\u4ee5\u663e\u793a\u4ec5\u5305\u542b\u4ee5\u4e0b\u6e90\u5143\u7d20\u7684\u7528\u6237\u914d\u7f6e\u6587\u4ef6\u6e90\uff1a \u8303\u56f4\u9650\u5b9a\u4e3a\u7279\u5b9a Experience Cloud \u7ad9\u70b9\u3002\u5177\u6709\u201c\u7528\u6237\u201d\u6216\u201c\u7ec4\u201d\u7236\u8bb0\u5f55\u7684\u6e90\u5143\u7d20\u7684\u8303\u56f4\u9650\u5b9a\u4e3a\u7f51\u7ad9\u3002\u9972\u6599 \u5176\u7236\u5143\u7d20\u662f\u9664\u201c\u7528\u6237\u201d\u6216\u201c\u7ec4\u201d\u4ee5\u5916\u7684\u8bb0\u5f55\u7c7b\u578b\u65f6\uff0c\u59cb\u7ec8\u5728\u6240\u6709\u5143\u7d20\u4e2d\u53ef\u89c1 \u7f51\u7ad9\u3002\u5c06\u6765\uff0c\u5176\u4ed6\u7236\u8bb0\u5f55\u7c7b\u578b\u7684\u8303\u56f4\u53ef\u4ee5\u9650\u5b9a\u4e3a\u7f51\u7ad9\u3002<\/p>\n\n\n\n<p>\u6b64\u793a\u4f8b\u8c03\u7528\u00a0<samp>getFeedElementsFromFeed\uff08communityId\uff0c feedType\uff0c subjectId\uff0c recentCommentCount\uff0c density\uff0c pageParam\u3001pageSize\u3001sortParam\u3001filter\uff09<\/samp>\u00a0\u4ec5\u83b7\u53d6\u7279\u5b9a\u4e8e\u7f51\u7ad9\u7684 Feed \u5143\u7d20\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ConnectApi.FeedElementPage fep = ConnectApi.ChatterFeeds.getFeedElementsFromFeed(Network.getNetworkId(), ConnectApi.FeedType.UserProfile, 'me', 3, ConnectApi.FeedDensity.FewerUpdates, null, null, ConnectApi.FeedSortOrder.LastModifiedDateDesc, ConnectApi.FeedFilter.CommunityScoped);<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u53d1\u5e03\u6e90\u5143\u7d20<\/h1>\n\n\n\n<p>\u8fdb\u884c\u8c03\u7528\u4ee5\u53d1\u5e03 Feed \u5143\u7d20\u3002\u8c03\u7528\u00a0<samp>postFeedElement\uff08communityId\uff0c subjectId\uff0c feedElementType\uff0c text\uff09<\/samp>\u00a0\u6765\u53d1\u5e03\u4e00\u4e2a\u5b57\u7b26\u4e32 \u53d1\u77ed\u4fe1\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ConnectApi.FeedElement feedElement = ConnectApi.ChatterFeeds.postFeedElement(Network.getNetworkId(), '0F9d0000000TreH', ConnectApi.FeedElementType.FeedItem, 'On vacation this week.');<\/code><\/pre>\n\n\n\n<p>\u8fd9 \u7b2c\u4e8c\u4e2a\u53c2\u6570\uff0csubjectId&nbsp;\u662f\u6b64\u6e90\u5143\u7d20\u7684\u7236\u5143\u7d20\u7684 ID \u88ab\u53d1\u5e03\u5230\u3002\u8be5\u503c\u53ef\u4ee5\u662f\u7528\u6237\u3001\u7ec4\u6216\u8bb0\u5f55\u7684 ID\uff0c\u4e5f\u53ef\u4ee5\u662f\u6307\u793a\u4e0a\u4e0b\u6587\u7528\u6237\u7684\u5b57\u7b26\u4e32\u3002<samp>me<\/samp><\/p>\n\n\n\n<h1 class=\"wp-block-heading\">\u53d1\u5e03\u5e26\u6709\u63d0\u53ca\u7684\u63d0\u8981\u5143\u7d20<\/h1>\n\n\n\n<p>\u8c03\u7528\u65b9\u6cd5\u6216\u4f7f\u7528 ConnectApiHelper \u5b58\u50a8\u5e93\u53d1\u5e03\u6e90\u3002\u60a8\u53ef\u4ee5\u901a\u8fc7\u4e24\u79cd\u65b9\u5f0f\u53d1\u5e03\u5e26\u6709\u63d0\u53ca\u7684\u63d0\u8981\u5143\u7d20\u3002\u4f7f\u7528\u00a0ConnectApiHelper \u5b58\u50a8\u5e93 \u5728 GitHub \u4e0a\u7f16\u5199\u4e00\u884c\u4ee3\u7801\uff0c\u6216\u8005\u4f7f\u7528\u6b64 \u793a\u4f8b\uff0c\u8c03\u7528\u00a0<samp>postFeedElement\uff08communityId\uff0c feedElement\uff09\u3002<\/samp><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ConnectApi.FeedItemInput feedItemInput = new ConnectApi.FeedItemInput();\nConnectApi.MentionSegmentInput mentionSegmentInput = new ConnectApi.MentionSegmentInput();\nConnectApi.MessageBodyInput messageBodyInput = new ConnectApi.MessageBodyInput();\nConnectApi.TextSegmentInput textSegmentInput = new ConnectApi.TextSegmentInput();\n\nmessageBodyInput.messageSegments = new List&lt;ConnectApi.MessageSegmentInput&gt;();\n\nmentionSegmentInput.id = '005RR000000Dme9';\nmessageBodyInput.messageSegments.add(mentionSegmentInput);\n\ntextSegmentInput.text = 'Could you take a look?';\nmessageBodyInput.messageSegments.add(textSegmentInput);\n\nfeedItemInput.body = messageBodyInput;\nfeedItemInput.feedElementType = ConnectApi.FeedElementType.FeedItem;\nfeedItemInput.subjectId = '0F9RR0000004CPw';\n\nConnectApi.FeedElement feedElement = ConnectApi.ChatterFeeds.postFeedElement(Network.getNetworkId(), feedItemInput);<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u4f7f\u7528\u73b0\u6709\u6587\u4ef6\u53d1\u5e03\u6e90\u5143\u7d20<\/h1>\n\n\n\n<p>\u8c03\u7528\u65b9\u6cd5\u4ee5\u53d1\u5e03\u5305\u542b\u5df2\u4e0a\u4f20\u6587\u4ef6\u7684\u6e90\u5143\u7d20\u3002\u8c03\u7528\u00a0<samp>postFeedElement\uff08communityId\uff0c feedElement\uff09<\/samp>\u00a0\u4ee5\u53d1\u5e03\u5305\u542b\u5df2\u4e0a\u4f20\u6587\u4ef6\u7684\u6e90\u9879\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ Define the FeedItemInput object to pass to postFeedElement\nConnectApi.FeedItemInput feedItemInput = new ConnectApi.FeedItemInput();\nfeedItemInput.subjectId = 'me';\n\nConnectApi.TextSegmentInput textSegmentInput = new ConnectApi.TextSegmentInput();\ntextSegmentInput.text = 'Would you please review these docs?';\n\n\/\/ The MessageBodyInput object holds the text in the post\nConnectApi.MessageBodyInput messageBodyInput = new ConnectApi.MessageBodyInput();\nmessageBodyInput.messageSegments = new List&lt;ConnectApi.MessageSegmentInput&gt;();\nmessageBodyInput.messageSegments.add(textSegmentInput);\nfeedItemInput.body = messageBodyInput;\n\n\/\/ The FeedElementCapabilitiesInput object holds the capabilities of the feed item.\n\/\/ For this feed item, we define a files capability to hold the file(s).\n\nList&lt;String&gt; fileIds = new List&lt;String&gt;();\nfileIds.add('069xx00000000QO');\nfileIds.add('069xx00000000QT');\nfileIds.add('069xx00000000Qn');\nfileIds.add('069xx00000000Qi');\nfileIds.add('069xx00000000Qd');\n\nConnectApi.FilesCapabilityInput filesInput = new ConnectApi.FilesCapabilityInput();\nfilesInput.items = new List&lt;ConnectApi.FileIdInput&gt;();\n\nfor (String fileId : fileIds) {\n    ConnectApi.FileIdInput idInput = new ConnectApi.FileIdInput();\n    idInput.id = fileId;\n    filesInput.items.add(idInput);\n}\n\nConnectApi.FeedElementCapabilitiesInput feedElementCapabilitiesInput = new ConnectApi.FeedElementCapabilitiesInput();\nfeedElementCapabilitiesInput.files = filesInput;\n\nfeedItemInput.capabilities = feedElementCapabilitiesInput;\n\n\/\/ Post the feed item. \nConnectApi.FeedElement feedElement = ConnectApi.ChatterFeeds.postFeedElement(Network.getNetworkId(), feedItemInput);<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u53d1\u5e03\u5e26\u6709\u5185\u5d4c\u56fe\u50cf\u7684\u5bcc\u6587\u672c\u6e90\u5143\u7d20<\/h1>\n\n\n\n<p>\u8c03\u7528\u65b9\u6cd5\u6216\u4f7f\u7528 ConnectApiHelper \u5b58\u50a8\u5e93\u53d1\u5e03\u5e26\u6709 \u5df2\u4e0a\u4f20\u7684\u5185\u5d4c\u56fe\u50cf\u3002\u60a8\u53ef\u4ee5\u901a\u8fc7\u4e24\u79cd\u65b9\u5f0f\u53d1\u5e03\u5e26\u6709\u5185\u5d4c\u56fe\u7247\u548c\u63d0\u53ca\u7684\u5bcc\u6587\u672c Feed \u5143\u7d20\u3002\u4f7f\u7528\u00a0GitHub \u4e0a\u7684 ConnectApiHelper \u5b58\u50a8\u5e93\u7f16\u5199\u5355\u884c \u4ee3\u7801\uff0c\u6216\u8005\u4f7f\u7528\u6b64\u793a\u4f8b\uff0c\u8be5\u793a\u4f8b\u8c03\u7528\u00a0<samp>postFeedElement\uff08communityId\uff0c feedElement\uff09\u3002<\/samp>\u5728\u6b64\u793a\u4f8b\u4e2d\uff0c\u56fe\u50cf\u6587\u4ef6\u662f\u5177\u6709 \u5df2\u4e0a\u4f20\u5230 Salesforce\u3002\u8be5\u5e16\u5b50\u8fd8\u5305\u62ec\u6587\u672c\u548c \u63d0\u5230\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>String communityId = null;\nString imageId = '069D00000001INA'; \nString mentionedUserId = '005D0000001QNpr'; \nString targetUserOrGroupOrRecordId  = '005D0000001Gif0';\nConnectApi.FeedItemInput input = new ConnectApi.FeedItemInput();\ninput.subjectId = targetUserOrGroupOrRecordId;\ninput.feedElementType = ConnectApi.FeedElementType.FeedItem;\n\nConnectApi.MessageBodyInput messageInput = new ConnectApi.MessageBodyInput();\nConnectApi.TextSegmentInput textSegment;\nConnectApi.MentionSegmentInput mentionSegment;\nConnectApi.MarkupBeginSegmentInput markupBeginSegment;\nConnectApi.MarkupEndSegmentInput markupEndSegment;\nConnectApi.InlineImageSegmentInput inlineImageSegment;\n\nmessageInput.messageSegments = new List&lt;ConnectApi.MessageSegmentInput&gt;();\n\nmarkupBeginSegment = new ConnectApi.MarkupBeginSegmentInput();\nmarkupBeginSegment.markupType = ConnectApi.MarkupType.Bold;\nmessageInput.messageSegments.add(markupBeginSegment);\n\ntextSegment = new ConnectApi.TextSegmentInput();\ntextSegment.text = 'Hello ';\nmessageInput.messageSegments.add(textSegment);\n\nmentionSegment = new ConnectApi.MentionSegmentInput();\nmentionSegment.id = mentionedUserId;\nmessageInput.messageSegments.add(mentionSegment);\n\ntextSegment = new ConnectApi.TextSegmentInput();\ntextSegment.text = '!';\nmessageInput.messageSegments.add(textSegment);\n\nmarkupEndSegment = new ConnectApi.MarkupEndSegmentInput();\nmarkupEndSegment.markupType = ConnectApi.MarkupType.Bold;\nmessageInput.messageSegments.add(markupEndSegment);\n\ninlineImageSegment = new ConnectApi.InlineImageSegmentInput();\ninlineImageSegment.altText = 'image one';\ninlineImageSegment.fileId = imageId;\nmessageInput.messageSegments.add(inlineImageSegment);\n\ninput.body = messageInput;\n\nConnectApi.ChatterFeeds.postFeedElement(communityId, input);<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u53d1\u5e03\u5e26\u6709\u4ee3\u7801\u5757\u7684\u5bcc\u6587\u672c\u6e90\u5143\u7d20<\/h1>\n\n\n\n<p>\u8c03\u7528\u65b9\u6cd5\u4ee5\u53d1\u5e03\u5e26\u6709\u4ee3\u7801\u5757\u7684\u6e90\u5143\u7d20\u3002\u8c03\u7528\u00a0<samp>postFeedElement\uff08communityId\uff0c feedElement\uff09<\/samp>\u00a0\u53d1\u5e03\u5e26\u6709\u4ee3\u7801\u5757\u7684\u6e90\u9879\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>String communityId = null;\nString targetUserOrGroupOrRecordId  = 'me';\nString codeSnippet = '&lt;html&gt;\\n\\t&lt;body&gt;\\n\\t\\tHello, world!\\n\\t&lt;\/body&gt;\\n&lt;\/html&gt;';\nConnectApi.FeedItemInput input = new ConnectApi.FeedItemInput();\ninput.subjectId = targetUserOrGroupOrRecordId;\ninput.feedElementType = ConnectApi.FeedElementType.FeedItem;\n\nConnectApi.MessageBodyInput messageInput = new ConnectApi.MessageBodyInput();\nConnectApi.TextSegmentInput textSegment;\nConnectApi.MarkupBeginSegmentInput markupBeginSegment;\nConnectApi.MarkupEndSegmentInput markupEndSegment;\n\nmessageInput.messageSegments = new List&lt;ConnectApi.MessageSegmentInput&gt;();\n\nmarkupBeginSegment = new ConnectApi.MarkupBeginSegmentInput();\nmarkupBeginSegment.markupType = ConnectApi.MarkupType.Code;\nmessageInput.messageSegments.add(markupBeginSegment);\n\ntextSegment = new ConnectApi.TextSegmentInput();\ntextSegment.text = codeSnippet;\nmessageInput.messageSegments.add(textSegment);\n\nmarkupEndSegment = new ConnectApi.MarkupEndSegmentInput();\nmarkupEndSegment.markupType = ConnectApi.MarkupType.Code;\nmessageInput.messageSegments.add(markupEndSegment);\n\ninput.body = messageInput;\n\nConnectApi.ChatterFeeds.postFeedElement(communityId, input);<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u53d1\u5e03\u5e26\u6709\u65b0\u6587\u4ef6\uff08\u4e8c\u8fdb\u5236\uff09\u9644\u4ef6\u7684\u6e90\u5143\u7d20<\/h1>\n\n\n\n<p>\u8c03\u7528\u65b9\u6cd5\u4ee5\u4f7f\u7528\u65b0\u6587\u4ef6\u53d1\u5e03\u6e90\u5143\u7d20\u3002<\/p>\n\n\n\n<p>\u91cd\u8981<\/p>\n\n\n\n<p>\u5728\u7248\u672c 36.0 \u53ca\u66f4\u9ad8\u7248\u672c\u4e2d\uff0c\u65e0\u6cd5\u53d1\u5e03\u6e90 \u5143\u7d20\u66ff\u6362\u4e3a\u540c\u4e00\u8c03\u7528\u4e2d\u7684\u65b0\u6587\u4ef6\u3002\u5c06\u6587\u4ef6\u4e0a\u4f20\u5230 Salesforce \u9996\u5148\uff0c\u7136\u540e\u5728\u53d1\u5e03\u6e90\u65f6\u6307\u5b9a\u73b0\u6709\u6587\u4ef6 \u5143\u7d20\u3002\u6b64\u793a\u4f8b\u8c03\u7528\u00a0<samp>postFeedElement\uff08communityId\uff0c feedElement\uff0c feedElementFileUpload\uff09<\/samp>\u00a0\u53d1\u5e03 Feed \u9879 \u4f7f\u7528\u65b0\u6587\u4ef6\uff08\u4e8c\u8fdb\u5236\uff09 \u9644\u4ef6\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ConnectApi.FeedItemInput input = new ConnectApi.FeedItemInput();\ninput.subjectId = 'me';\n\nConnectApi.ContentCapabilityInput contentInput = new ConnectApi.ContentCapabilityInput();\ncontentInput.title = 'Title';\n\nConnectApi.FeedElementCapabilitiesInput capabilities = new ConnectApi.FeedElementCapabilitiesInput();\ncapabilities.content = contentInput;\n\ninput.capabilities = capabilities;\n\nString text = 'These are the contents of the new file.';\nBlob myBlob = Blob.valueOf(text);\nConnectApi.BinaryInput binInput = new ConnectApi.BinaryInput(myBlob, 'text\/plain', 'fileName');\n\nConnectApi.ChatterFeeds.postFeedElement(Network.getNetworkId(), input, binInput);<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u53d1\u5e03\u4e00\u6279 Feed \u5143\u7d20<\/h1>\n\n\n\n<p>\u4f7f\u7528\u89e6\u53d1\u5668\u8c03\u7528\u65b9\u6cd5\u4ee5\u6279\u91cf\u53d1\u5e03\u5230\u5e10\u6237\u7684\u6e90\u3002\u6b64\u89e6\u53d1\u5668\u8c03\u7528\u00a0<samp>postFeedElementBatch\uff08communityId\uff0c feedElements\uff09<\/samp>\u00a0\u5230 \u6279\u91cf\u53d1\u5e03\u5230\u65b0\u63d2\u5165\u7684\u6e90 \u5e10\u6237\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>trigger postFeedItemToAccount on Account (after insert) {\n    Account&#91;] accounts = Trigger.new;\n    \n    \/\/ Bulk post to the account feeds.\n\n    List&lt;ConnectApi.BatchInput&gt; batchInputs = new List&lt;ConnectApi.BatchInput&gt;();\n\n    for (Account a : accounts) {\n        ConnectApi.FeedItemInput input = new ConnectApi.FeedItemInput();\n\n        input.subjectId = a.id;\n        \n        ConnectApi.MessageBodyInput body = new ConnectApi.MessageBodyInput();\n        body.messageSegments = new List&lt;ConnectApi.MessageSegmentInput&gt;();\n\n        ConnectApi.TextSegmentInput textSegment = new ConnectApi.TextSegmentInput();\n        textSegment.text = 'Let\\'s win the ' + a.name + ' account.';\n\n        body.messageSegments.add(textSegment);\n        input.body = body;\n\n        ConnectApi.BatchInput batchInput = new ConnectApi.BatchInput(input);\n        batchInputs.add(batchInput);\n    }\n\n    ConnectApi.ChatterFeeds.postFeedElementBatch(Network.getNetworkId(), batchInputs);\n}<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u4f7f\u7528\u65b0\u7684\uff08\u4e8c\u8fdb\u5236\uff09\u6587\u4ef6\u53d1\u5e03\u4e00\u6279\u6e90\u5143\u7d20<\/h1>\n\n\n\n<p>\u4f7f\u7528\u89e6\u53d1\u5668\u8c03\u7528\u65b9\u6cd5\u5c06\u65b0\u6587\u4ef6\u6279\u91cf\u53d1\u5e03\u5230 \u5e10\u6237\u3002<\/p>\n\n\n\n<p>\u91cd\u8981<\/p>\n\n\n\n<p>\u6b64\u793a\u4f8b\u5728\u7248\u672c 32.0\u201335.0 \u4e2d\u6709\u6548\u3002\u5728 \u7248\u672c 36.0 \u53ca\u66f4\u9ad8\u7248\u672c\u4e2d\uff0c\u60a8\u65e0\u6cd5\u5728 \u540c\u6837\u7684\u7535\u8bdd\u3002\u9996\u5148\u5c06\u6587\u4ef6\u4e0a\u4f20\u5230 Salesforce\uff0c\u7136\u540e\u6307\u5b9a\u4e0a\u4f20\u7684 \u6587\u4ef6\u3002\u6b64\u89e6\u53d1\u5668\u8c03\u7528\u00a0<samp>postFeedElementBatch\uff08communityId\uff0c feedElements\uff09<\/samp>\u00a0\u4ee5\u6279\u91cf\u53d1\u5e03\u5230 \u65b0\u63d2\u5165\u7684\u5e10\u6237\u7684 Feed\u3002\u6bcf\u4e2a\u5e16\u5b50\u90fd\u6709\u4e00\u4e2a\u65b0\u6587\u4ef6\uff08\u4e8c\u8fdb\u5236\uff09 \u9644\u4ef6\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>trigger postFeedItemToAccountWithBinary on Account (after insert) {\n    Account&#91;] accounts = Trigger.new;\n    \n    \/\/ Bulk post to the account feeds.\n\n    List&lt;ConnectApi.BatchInput&gt; batchInputs = new List&lt;ConnectApi.BatchInput&gt;();\n\n    for (Account a : accounts) {\n        ConnectApi.FeedItemInput input = new ConnectApi.FeedItemInput();\n\n        input.subjectId = a.id;\n        \n        ConnectApi.MessageBodyInput body = new ConnectApi.MessageBodyInput();\n        body.messageSegments = new List&lt;ConnectApi.MessageSegmentInput&gt;();\n\n        ConnectApi.TextSegmentInput textSegment = new ConnectApi.TextSegmentInput();\n        textSegment.text = 'Let\\'s win the ' + a.name + ' account.';\n\n        body.messageSegments.add(textSegment);\n        input.body = body;\n\n        ConnectApi.ContentCapabilityInput contentInput = new ConnectApi.ContentCapabilityInput();\n        contentInput.title = 'Title';\n\n        ConnectApi.FeedElementCapabilitiesInput capabilities = new ConnectApi.FeedElementCapabilitiesInput();\n        capabilities.content = contentInput;\n\n        input.capabilities = capabilities;\n\n        String text = 'We are words in a file.';\n        Blob myBlob = Blob.valueOf(text);\n        ConnectApi.BinaryInput binInput = new ConnectApi.BinaryInput(myBlob, 'text\/plain', 'fileName');\n\n        ConnectApi.BatchInput batchInput = new ConnectApi.BatchInput(input, binInput);\n\n        batchInputs.add(batchInput);\n    }\n\n    ConnectApi.ChatterFeeds.postFeedElementBatch(Network.getNetworkId(), batchInputs);<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u5b9a\u4e49\u64cd\u4f5c\u94fe\u63a5\u5e76\u4f7f\u7528\u6e90\u5143\u7d20\u53d1\u5e03<\/h1>\n\n\n\n<p>\u5728\u64cd\u4f5c\u94fe\u63a5\u7ec4\u4e2d\u521b\u5efa\u4e00\u4e2a\u64cd\u4f5c\u94fe\u63a5\uff0c\u5c06\u8be5\u64cd\u4f5c\u94fe\u63a5\u7ec4\u4e0e Feed \u9879\u76ee\uff0c\u7136\u540e\u53d1\u5e03 Feed \u9879\u76ee\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"322\" height=\"432\" src=\"http:\/\/www.ponybai.com\/wp-content\/uploads\/2023\/11\/connect1.png\" alt=\"\" class=\"wp-image-3708\" srcset=\"http:\/\/www.ponybai.com\/wp-content\/uploads\/2023\/11\/connect1.png 322w, http:\/\/www.ponybai.com\/wp-content\/uploads\/2023\/11\/connect1-224x300.png 224w\" sizes=\"(max-width: 322px) 100vw, 322px\" \/><\/figure>\n\n\n\n<p>\u5f53\u7528\u6237\u5355\u51fb\u64cd\u4f5c\u94fe\u63a5\u65f6\uff0c\u64cd\u4f5c\u94fe\u63a5\u5c06\u8bf7\u6c42\u8fde\u63a5 REST API resource \uff0c\u7528\u4e8e\u53d1\u5e03\u6e90 \u9879\u76ee\u6dfb\u52a0\u5230\u7528\u6237\u7684 Feed\u3002\u7528\u6237\u5355\u51fb\u64cd\u4f5c\u94fe\u63a5\u5e76\u6210\u529f\u6267\u884c\u540e\uff0c \u5176\u72b6\u6001\u66f4\u6539\u4e3a\u201c\u6210\u529f\u201d\uff0c\u5e76\u4e14\u6e90\u9879 UI \u5df2\u66f4\u65b0\u3002<samp>\/chatter\/feed-elements<\/samp><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"322\" height=\"363\" src=\"http:\/\/www.ponybai.com\/wp-content\/uploads\/2023\/11\/connect2.png\" alt=\"\" class=\"wp-image-3709\" srcset=\"http:\/\/www.ponybai.com\/wp-content\/uploads\/2023\/11\/connect2.png 322w, http:\/\/www.ponybai.com\/wp-content\/uploads\/2023\/11\/connect2-266x300.png 266w\" sizes=\"(max-width: 322px) 100vw, 322px\" \/><\/figure>\n\n\n\n<p>\u5237\u65b0\u7528\u6237\u7684 Feed \u4ee5\u67e5\u770b\u65b0\u5e16\u5b50\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"320\" height=\"391\" src=\"http:\/\/www.ponybai.com\/wp-content\/uploads\/2023\/11\/connect3.png\" alt=\"\" class=\"wp-image-3710\" srcset=\"http:\/\/www.ponybai.com\/wp-content\/uploads\/2023\/11\/connect3.png 320w, http:\/\/www.ponybai.com\/wp-content\/uploads\/2023\/11\/connect3-246x300.png 246w\" sizes=\"(max-width: 320px) 100vw, 320px\" \/><\/figure>\n\n\n\n<p>\u8fd9\u4e2a\u7b80\u5355\u793a\u4f8b\u5411\u60a8\u5c55\u793a\u4e86\u5982\u4f55\u4f7f\u7528\u64cd\u4f5c\u94fe\u63a5\u6765\u8c03\u7528 Salesforce \u8d44\u6e90\u3002<\/p>\n\n\n\n<p>\u5c06\u64cd\u4f5c\u94fe\u63a5\u89c6\u4e3a Feed \u9879\u4e0a\u7684\u6309\u94ae\u3002\u5c31\u50cf\u4e00\u4e2a\u6309\u94ae\uff0c\u4e00\u4e2a\u52a8\u4f5c \u94fe\u63a5\u5b9a\u4e49\u5305\u62ec\u6807\u7b7e \uff08\uff09\u3002\u4e00\u4e2a\u52a8\u4f5c \u94fe\u63a5\u7ec4\u5b9a\u4e49\u8fd8\u5305\u62ec\u5176\u4ed6\u5c5e\u6027\uff0c\u5982 URL \uff08\uff09\u3001HTTP \u65b9\u6cd5 \uff08\uff09 \u548c \u53ef\u9009\u8bf7\u6c42\u6b63\u6587 \uff08\uff09 \u548c HTTP \u6807\u5934 ().<samp>labelKey<\/samp><samp>actionUrl<\/samp><samp>method<\/samp><samp>requestBody<\/samp><samp>headers<\/samp><\/p>\n\n\n\n<p>\u5f53\u7528\u6237\u5355\u51fb\u6b64\u64cd\u4f5c\u94fe\u63a5\u65f6\uff0c \u5411 Connect REST API \u8d44\u6e90\u53d1\u51fa HTTP POST \u8bf7\u6c42\uff0c\u8be5\u8d44\u6e90\u5c06\u6e90\u9879\u53d1\u5e03\u5230 \u558b\u558b\u4e0d\u4f11\u3002\u8be5\u5c5e\u6027\u4fdd\u7559\u8bf7\u6c42 \u8d44\u6e90\u7684\u6b63\u6587\uff0c\u5305\u62ec \u65b0\u7684\u6e90\u9879\u3002\u5728\u6b64\u793a\u4f8b\u4e2d\uff0c\u65b0\u7684\u6e90\u9879\u4ec5\u5305\u542b\u6587\u672c\uff0c\u4f46\u53ef\u4ee5 \u5305\u62ec\u5176\u4ed6\u529f\u80fd\uff0c\u4f8b\u5982\u6587\u4ef6\u9644\u4ef6\u3001\u8f6e\u8be2\u751a\u81f3\u64cd\u4f5c \u94fe\u63a5\u3002<samp>requestBody<\/samp><samp>actionUrl<\/samp><\/p>\n\n\n\n<p>\u5c31\u50cf\u5355\u9009\u6309\u94ae\u4e00\u6837\uff0c\u64cd\u4f5c\u94fe\u63a5\u5fc5\u987b\u5d4c\u5957\u5728\u4e00\u4e2a\u7ec4\u4e2d\u3002\u64cd\u4f5c\u94fe\u63a5 \u5728\u7ec4\u5185\u5171\u4eab\u7ec4\u7684\u5c5e\u6027\uff0c\u5e76\u4e14\u662f\u4e92\u65a5\u7684\uff08\u53ef\u4ee5\u5355\u51fb \u4e00\u4e2a\u7ec4\u4e2d\u53ea\u6709\u4e00\u4e2a\u64cd\u4f5c\u94fe\u63a5\uff09\u3002\u5373\u4f7f\u53ea\u5b9a\u4e49\u4e00\u4e2a\u64cd\u4f5c\u94fe\u63a5\uff0c\u5b83\u4e5f\u5fc5\u987b \u64cd\u4f5c\u94fe\u63a5\u7ec4\u7684\u4e00\u90e8\u5206\u3002<\/p>\n\n\n\n<p>\u6b64\u793a\u4f8b\u8c03\u7528\u00a0<samp>ConnectApi.ActionLinks.createActionLinkGroupDefinition\uff08communityId\uff0c actionLinkGroup\uff09<\/samp>\u00a0\u521b\u5efa\u64cd\u4f5c\u94fe\u63a5\u7ec4\u5b9a\u4e49\u3002<\/p>\n\n\n\n<p>\u5b83 \u4fdd\u5b58\u8be5\u8c03\u7528\u4e2d\u7684\u64cd\u4f5c\u94fe\u63a5\u7ec4 ID\uff0c\u5e76\u5c06\u5176\u4e0e \u8c03\u7528\u00a0<samp>ConnectApi.ChatterFeeds.postFeedElement\uff08communityId\uff0c feedElement\uff09\u3002<\/samp><\/p>\n\n\n\n<p>\u82e5\u8981\u4f7f\u7528\u6b64\u4ee3\u7801\uff0c\u8bf7\u5c06 OAuth \u503c\u66ff\u6362\u4e3a\u4f60\u81ea\u5df1\u7684\u503c Salesforce\u7ec4\u7ec7\u3002\u6b64\u5916\uff0c\u8bf7\u9a8c\u8bc1\u662f\u5426\u5728\u5c06\u6765\u3002\u5728 \u6cd5\u5178\u3002<samp>expirationDate<\/samp><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ConnectApi.ActionLinkGroupDefinitionInput actionLinkGroupDefinitionInput = new ConnectApi.ActionLinkGroupDefinitionInput();\nConnectApi.ActionLinkDefinitionInput actionLinkDefinitionInput = new ConnectApi.ActionLinkDefinitionInput();\nConnectApi.RequestHeaderInput requestHeaderInput1 = new ConnectApi.RequestHeaderInput();\nConnectApi.RequestHeaderInput requestHeaderInput2 = new ConnectApi.RequestHeaderInput();\n\n\/\/ Create the action link group definition.\nactionLinkGroupDefinitionInput.actionLinks = New List&lt;ConnectApi.ActionLinkDefinitionInput&gt;();\nactionLinkGroupDefinitionInput.executionsAllowed = ConnectApi.ActionLinkExecutionsAllowed.OncePerUser;\nactionLinkGroupDefinitionInput.category = ConnectApi.PlatformActionGroupCategory.Primary;\n\/\/ To Do: Verify that the date is in the future.\n\/\/ Action link groups are removed from feed elements on the expiration date.\ndatetime myDate = datetime.newInstance(2016, 3, 1);\nactionLinkGroupDefinitionInput.expirationDate = myDate;\n\n\/\/ Create the action link definition.\nactionLinkDefinitionInput.actionType = ConnectApi.ActionLinkType.Api;\nactionLinkDefinitionInput.actionUrl = '\/services\/data\/v33.0\/chatter\/feed-elements';\nactionLinkDefinitionInput.headers = new List&lt;ConnectApi.RequestHeaderInput&gt;();\nactionLinkDefinitionInput.labelKey = 'Post';\nactionLinkDefinitionInput.method = ConnectApi.HttpRequestMethod.HttpPost;\nactionLinkDefinitionInput.requestBody = '{\\\"subjectId\\\": \\\"me\\\",\\\"feedElementType\\\": \\\"FeedItem\\\",\\\"body\\\": {\\\"messageSegments\\\": &#91;{\\\"type\\\": \\\"Text\\\",\\\"text\\\": \\\"This is a test post created via an API action link.\\\"}]}}';\nactionLinkDefinitionInput.requiresConfirmation = true;\n\n\/\/ To Do: Substitute an OAuth value for your Salesforce org. \nrequestHeaderInput1.name = 'Authorization';\nrequestHeaderInput1.value = 'OAuth 00DD00000007WNP!ARsAQCwoeV0zzAV847FTl4zF.85w.EwsPbUgXR4SAjsp';\nactionLinkDefinitionInput.headers.add(requestHeaderInput1);\n\nrequestHeaderInput2.name = 'Content-Type';\nrequestHeaderInput2.value = 'application\/json';\nactionLinkDefinitionInput.headers.add(requestHeaderInput2);\n\n\/\/ Add the action link definition to the action link group definition.\nactionLinkGroupDefinitionInput.actionLinks.add(actionLinkDefinitionInput);\n\n\/\/ Instantiate the action link group definition.\nConnectApi.ActionLinkGroupDefinition actionLinkGroupDefinition = ConnectApi.ActionLinks.createActionLinkGroupDefinition(Network.getNetworkId(), actionLinkGroupDefinitionInput);\n\nConnectApi.FeedItemInput feedItemInput = new ConnectApi.FeedItemInput();\nConnectApi.FeedElementCapabilitiesInput feedElementCapabilitiesInput = new ConnectApi.FeedElementCapabilitiesInput();\nConnectApi.AssociatedActionsCapabilityInput associatedActionsCapabilityInput = new ConnectApi.AssociatedActionsCapabilityInput();\nConnectApi.MessageBodyInput messageBodyInput = new ConnectApi.MessageBodyInput();\nConnectApi.TextSegmentInput textSegmentInput = new ConnectApi.TextSegmentInput();\n\n\/\/ Set the properties of the feedItemInput object.\nfeedItemInput.body = messageBodyInput;\nfeedItemInput.capabilities = feedElementCapabilitiesInput;\nfeedItemInput.subjectId = 'me';\n\n\/\/ Create the text for the post.\nmessageBodyInput.messageSegments = new List&lt;ConnectApi.MessageSegmentInput&gt;();\ntextSegmentInput.text = 'Click to post a feed item.';  \nmessageBodyInput.messageSegments.add(textSegmentInput);\n\n\n\/\/ The feedElementCapabilitiesInput object holds the capabilities of the feed item.\n\/\/ Define an associated actions capability to hold the action link group.\n\/\/ The action link group ID is returned from the call to create the action link group definition. \nfeedElementCapabilitiesInput.associatedActions = associatedActionsCapabilityInput;\nassociatedActionsCapabilityInput.actionLinkGroupIds = new List&lt;String&gt;();\nassociatedActionsCapabilityInput.actionLinkGroupIds.add(actionLinkGroupDefinition.id);\n\n\/\/ Post the feed item. \nConnectApi.FeedElement feedElement = ConnectApi.ChatterFeeds.postFeedElement(Network.getNetworkId(), feedItemInput);<\/code><\/pre>\n\n\n\n<p>\u6ce8\u610f<\/p>\n\n\n\n<p>\u5982\u679c \u5f00\u673a\u81ea\u68c0\u5931\u8d25\uff0c\u8bf7\u68c0\u67e5 OAuth ID\u3002<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">\u5728\u6a21\u677f\u4e2d\u5b9a\u4e49\u64cd\u4f5c\u94fe\u63a5\u5e76\u4f7f\u7528 Feed \u5143\u7d20\u53d1\u5e03<\/h1>\n\n\n\n<p>\u521b\u5efa\u64cd\u4f5c\u94fe\u63a5\u548c\u64cd\u4f5c\u94fe\u63a5\u7ec4\uff0c\u5e76\u4ece \u4e00\u4e2a\u6a21\u677f\u3002<\/p>\n\n\n\n<p>\u6b64\u793a\u4f8b\u521b\u5efa\u4e0e\u793a\u4f8b\u00a0Define an Action Link and Post with a Feed Element\u00a0\u76f8\u540c\u7684\u64cd\u4f5c\u94fe\u63a5\u548c\u64cd\u4f5c\u94fe\u63a5\u7ec4\uff0c\u4f46\u6b64\u793a\u4f8b \u4ece\u6a21\u677f\u5b9e\u4f8b\u5316\u64cd\u4f5c\u94fe\u63a5\u7ec4\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u6b65\u9aa4 1\uff1a\u521b\u5efa\u64cd\u4f5c\u94fe\u63a5\u6a21\u677f<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u5728\u201c\u8bbe\u7f6e\u201d\u4e2d\uff0c\u8f93\u5165\u201c\u5feb\u901f\u201d \u201c\u67e5\u627e\u201d\u6846\uff0c\u7136\u540e\u9009\u62e9\u201c<strong>\u64cd\u4f5c\u94fe\u63a5\u6a21\u677f<\/strong>\u201d\u3002<kbd>Action Link Templates<\/kbd><\/li>\n\n\n\n<li>\u5728\u65b0\u7684\u64cd\u4f5c\u94fe\u63a5\u7ec4\u6a21\u677f\u4e2d\u4f7f\u7528\u4ee5\u4e0b\u503c\uff1a\u7530\u4ef7\u503c\u540d\u5b57\u6587\u6863\u793a\u4f8b\u5f00\u53d1\u5546\u540d\u79f0Doc_Example\u7c7b\u522b\u4e3b\u8981\u64cd\u4f5c\u5141\u8bb8\u6267\u884c\u6bcf\u4e2a\u7528\u6237\u4e00\u6b21<\/li>\n\n\n\n<li>\u5728\u65b0\u7684\u64cd\u4f5c\u94fe\u63a5\u6a21\u677f\u4e2d\u4f7f\u7528\u4ee5\u4e0b\u503c\uff1a\u7530\u4ef7\u503c\u64cd\u4f5c\u94fe\u63a5\u7ec4\u6a21\u677f\u6587\u6863\u793a\u4f8b\u64cd\u4f5c\u7c7b\u578b\u5e94\u7528\u7a0b\u5e8f\u63a5\u53e3\u64cd\u4f5c URL\/services\/data\/{\uff01Bindings.ApiVersion}\/\u804a\u5929\/\u9988\u9001\u5143\u7d20\u7528\u6237\u53ef\u89c6\u6027\u6bcf\u4e2a\u4eba\u90fd\u53ef\u4ee5\u770b\u5230HTTP \u8bf7\u6c42\u6b63\u6587{ \u201csubjectId\u201d\uff1a\u201c{\uff01Bindings.SubjectId}\u201c\uff0c \u201dfeedElementType\u201c\uff1a\u201dFeedItem\u201c\uff0c \u201cbody\u201d\uff1a{ \u201cmessageSegments\u201d\uff1a[ { \u201ctype\u201d\uff1a\u201cText\u201d\uff0c \u201ctext\u201d\uff1a\u201c{\uff01Bindings.Text}\u201c } ] } }HTTP \u6807\u5934\u5185\u5bb9\u7c7b\u578b\uff1aapplication\/json\u4f4d\u7f6e0\u6807\u7b7e\u952e\u53d1\u5e03HTTP \u65b9\u6cd5\u53d1\u5e03<\/li>\n\n\n\n<li>\u8fd4\u56de\u5230\u201c\u64cd\u4f5c\u94fe\u63a5\u7ec4\u6a21\u677f\u201d\uff0c\u7136\u540e\u9009\u62e9\u201c\u5df2\u53d1\u5e03\u201d\u3002 \u70b9\u51fb<strong>\u4fdd\u5b58<\/strong>\u3002<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">\u6b65\u9aa4 2\uff1a\u5b9e\u4f8b\u5316\u64cd\u4f5c\u94fe\u63a5\u7ec4\uff0c\u5c06\u5176\u4e0e\u6e90\u9879\u5173\u8054\uff0c\u7136\u540e\u53d1\u5e03 \u5b83<\/h2>\n\n\n\n<p>\u6b64\u793a\u4f8b\u8c03\u7528\u00a0<samp>ConnectApi.ActionLinks.createActionLinkGroupDefinition\uff08communityId\uff0c actionLinkGroup\uff09<\/samp>\u00a0\u521b\u5efa\u64cd\u4f5c\u94fe\u63a5\u7ec4\u5b9a\u4e49\u3002<\/p>\n\n\n\n<p>\u5b83\u8c03\u7528\u00a0<samp>ConnectApi.ChatterFeeds.postFeedElement\uff08communityId\uff0c feedElement\uff09<\/samp>\u00a0\u5c06\u64cd\u4f5c\u94fe\u63a5\u7ec4\u4e0e\u6e90\u9879\u5173\u8054\u5e76\u53d1\u5e03\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ Get the action link group template Id.\nActionLinkGroupTemplate template = &#91;SELECT Id FROM ActionLinkGroupTemplate WHERE DeveloperName='Doc_Example'];\n\n\/\/ Add binding name-value pairs to a map.\n\/\/ The names are defined in the action link template(s) associated with the action link group template.\n\/\/ Get them from Setup UI or SOQL.\nMap&lt;String, String&gt; bindingMap = new Map&lt;String, String&gt;();\nbindingMap.put('ApiVersion', 'v33.0');\nbindingMap.put('Text', 'This post was created by an API action link.');\nbindingMap.put('SubjectId', 'me');\n\n\/\/ Create ActionLinkTemplateBindingInput objects from the map elements.\nList&lt;ConnectApi.ActionLinkTemplateBindingInput&gt; bindingInputs = new List&lt;ConnectApi.ActionLinkTemplateBindingInput&gt;();\n\nfor (String key : bindingMap.keySet()) {\n    ConnectApi.ActionLinkTemplateBindingInput bindingInput = new ConnectApi.ActionLinkTemplateBindingInput();\n    bindingInput.key = key;\n    bindingInput.value = bindingMap.get(key);\n    bindingInputs.add(bindingInput);\n}\n\n\/\/ Set the template Id and template binding values in the action link group definition.\nConnectApi.ActionLinkGroupDefinitionInput actionLinkGroupDefinitionInput = new ConnectApi.ActionLinkGroupDefinitionInput();\nactionLinkGroupDefinitionInput.templateId = template.id;\nactionLinkGroupDefinitionInput.templateBindings = bindingInputs;\n\n\/\/ Instantiate the action link group definition.\nConnectApi.ActionLinkGroupDefinition actionLinkGroupDefinition =\n ConnectApi.ActionLinks.createActionLinkGroupDefinition(Network.getNetworkId(), actionLinkGroupDefinitionInput);\n\nConnectApi.FeedItemInput feedItemInput = new ConnectApi.FeedItemInput();\nConnectApi.FeedElementCapabilitiesInput feedElementCapabilitiesInput = new ConnectApi.FeedElementCapabilitiesInput();\nConnectApi.AssociatedActionsCapabilityInput associatedActionsCapabilityInput = new ConnectApi.AssociatedActionsCapabilityInput();\nConnectApi.MessageBodyInput messageBodyInput = new ConnectApi.MessageBodyInput();\nConnectApi.TextSegmentInput textSegmentInput = new ConnectApi.TextSegmentInput();\n\n\/\/ Define the FeedItemInput object to pass to postFeedElement\nfeedItemInput.body = messageBodyInput;\nfeedItemInput.capabilities = feedElementCapabilitiesInput;\nfeedItemInput.subjectId = 'me';\n\n\/\/ The MessageBodyInput object holds the text in the post\nmessageBodyInput.messageSegments = new List&lt;ConnectApi.MessageSegmentInput&gt;();\n\ntextSegmentInput.text = 'Click to post a feed item.';\nmessageBodyInput.messageSegments.add(textSegmentInput);\n\n\n\/\/ The FeedElementCapabilitiesInput object holds the capabilities of the feed item.\n\/\/ For this feed item, we define an associated actions capability to hold the action link group.\n\/\/ The action link group ID is returned from the call to create the action link group definition. \nfeedElementCapabilitiesInput.associatedActions = associatedActionsCapabilityInput;\nassociatedActionsCapabilityInput.actionLinkGroupIds = new List&lt;String&gt;();\nassociatedActionsCapabilityInput.actionLinkGroupIds.add(actionLinkGroupDefinition.id);\n\n\/\/ Post the feed item. \nConnectApi.FeedElement feedElement = ConnectApi.ChatterFeeds.postFeedElement(Network.getNetworkId(), feedItemInput);<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u7f16\u8f91 Feed \u5143\u7d20<\/h1>\n\n\n\n<p>\u8c03\u7528\u65b9\u6cd5\u4ee5\u7f16\u8f91 Feed \u5143\u7d20\u3002\u8c03\u7528\u00a0<samp>updateFeedElement\uff08communityId\uff0c feedElementId\u3001feedElement\uff09<\/samp>\u00a0\u6765\u7f16\u8f91 Feed \u5143\u7d20\u3002Feed \u9879\u662f \u552f\u4e00\u53ef\u4ee5 \u7f16\u8f91\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>String communityId = Network.getNetworkId();\n\n\/\/ Get the last feed item created by the context user.\nList&lt;FeedItem&gt; feedItems = &#91;SELECT Id FROM FeedItem WHERE CreatedById = :UserInfo.getUserId() ORDER BY CreatedDate DESC];\nif (feedItems.isEmpty()) {\n    \/\/ Return null within anonymous apex.\n    return null;\n}\nString feedElementId = feedItems&#91;0].id;\n\nConnectApi.FeedEntityIsEditable isEditable = ConnectApi.ChatterFeeds.isFeedElementEditableByMe(communityId, feedElementId);\n\nif (isEditable.isEditableByMe == true){\n    ConnectApi.FeedItemInput feedItemInput = new ConnectApi.FeedItemInput();\n    ConnectApi.MessageBodyInput messageBodyInput = new ConnectApi.MessageBodyInput();\n    ConnectApi.TextSegmentInput textSegmentInput = new ConnectApi.TextSegmentInput();\n\n    messageBodyInput.messageSegments = new List&lt;ConnectApi.MessageSegmentInput&gt;();\n\n    textSegmentInput.text = 'This is my edited post.';\n    messageBodyInput.messageSegments.add(textSegmentInput);\n\n    feedItemInput.body = messageBodyInput;\n\n    ConnectApi.FeedElement editedFeedElement = ConnectApi.ChatterFeeds.updateFeedElement(communityId, feedElementId, feedItemInput);\n}<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u7f16\u8f91\u95ee\u9898\u6807\u9898\u548c\u5e16\u5b50<\/h1>\n\n\n\n<p>\u8c03\u7528\u65b9\u6cd5\u4ee5\u7f16\u8f91\u95ee\u9898\u6807\u9898\u548c\u5e16\u5b50\u3002\u8c03\u7528\u00a0<samp>updateFeedElement\uff08communityId\uff0c feedElementId\u3001feedElement\uff09<\/samp>\u00a0\u7f16\u8f91\u95ee\u9898\u6807\u9898\u548c\u5e16\u5b50\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>String communityId = Network.getNetworkId();\n\n\/\/ Get the last feed item created by the context user.\nList&lt;FeedItem&gt; feedItems = &#91;SELECT Id FROM FeedItem WHERE CreatedById = :UserInfo.getUserId() ORDER BY CreatedDate DESC];\nif (feedItems.isEmpty()) {\n    \/\/ Return null within anonymous apex.\n    return null;\n}\nString feedElementId = feedItems&#91;0].id;\n\nConnectApi.FeedEntityIsEditable isEditable = ConnectApi.ChatterFeeds.isFeedElementEditableByMe(communityId, feedElementId);\n\nif (isEditable.isEditableByMe == true){\n\n    ConnectApi.FeedItemInput feedItemInput = new ConnectApi.FeedItemInput();\n    ConnectApi.FeedElementCapabilitiesInput feedElementCapabilitiesInput = new ConnectApi.FeedElementCapabilitiesInput();\n    ConnectApi.QuestionAndAnswersCapabilityInput questionAndAnswersCapabilityInput = new ConnectApi.QuestionAndAnswersCapabilityInput();\n    ConnectApi.MessageBodyInput messageBodyInput = new ConnectApi.MessageBodyInput();\n    ConnectApi.TextSegmentInput textSegmentInput = new ConnectApi.TextSegmentInput();\n\n    messageBodyInput.messageSegments = new List&lt;ConnectApi.MessageSegmentInput&gt;();\n\n    textSegmentInput.text = 'This is my edited question.';\n    messageBodyInput.messageSegments.add(textSegmentInput);\n\n    feedItemInput.body = messageBodyInput;\n    feedItemInput.capabilities = feedElementCapabilitiesInput;\n\n    feedElementCapabilitiesInput.questionAndAnswers = questionAndAnswersCapabilityInput;\n    questionAndAnswersCapabilityInput.questionTitle = 'Where is my edited question?';\n\n    ConnectApi.FeedElement editedFeedElement = ConnectApi.ChatterFeeds.updateFeedElement(communityId, feedElementId, feedItemInput);\n}<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u50cf\u9972\u6599\u5143\u7d20\u4e00\u6837<\/h1>\n\n\n\n<p>\u8c03\u7528\u4e00\u4e2a\u65b9\u6cd5\u6765\u559c\u6b22\u4e00\u4e2a\u6e90\u5143\u7d20\u3002\u8c03\u7528\u00a0<samp>likeFeedElement\uff08communityId\uff0c feedElementId\uff09<\/samp>\u00a0\u6765\u70b9\u8d5e Feed \u5143\u7d20\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ConnectApi.ChatterLike chatterLike = ConnectApi.ChatterFeeds.likeFeedElement(null, '0D5D0000000KuGh');<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u4e3a Feed \u5143\u7d20\u6dfb\u52a0\u4e66\u7b7e<\/h1>\n\n\n\n<p>\u8c03\u7528\u65b9\u6cd5\u4e3a\u6e90\u5143\u7d20\u6dfb\u52a0\u4e66\u7b7e\u3002\u8c03\u7528\u00a0<samp>updateFeedElementBookmarks\uff08communityId\uff0c feedElementId\uff0c isBookmarkedByCurrentUser\uff09<\/samp>\u00a0\u4e3a\u63d0\u8981\u6dfb\u52a0\u4e66\u7b7e \u5143\u7d20\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ConnectApi.BookmarksCapability bookmark = ConnectApi.ChatterFeeds.updateFeedElementBookmarks(null, '0D5D0000000KuGh', true);<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u5171\u4eab\u6e90\u5143\u7d20\uff08\u7248\u672c 39.0 \u4e4b\u524d\uff09<\/h1>\n\n\n\n<p>\u8c03\u7528\u65b9\u6cd5\u4ee5\u5171\u4eab\u6e90\u5143\u7d20\u3002<\/p>\n\n\n\n<p>\u91cd\u8981<\/p>\n\n\n\n<p>\u5728 API \u7248\u672c 39.0 \u53ca\u66f4\u9ad8\u7248\u672c\u4e2d\uff0c\u4e0d\u53d7\u652f\u6301\u3002\u8bf7\u53c2\u9605\u5171\u4eab Feed \u5143\u7d20\uff08\u5728\u7248\u672c 39.0 \u53ca\u66f4\u9ad8\u7248\u672c\u4e2d\uff09\u3002<samp>shareFeedElement(communityId, subjectId, feedElementType, originalFeedElementId)<\/samp>\u8c03\u7528\u00a0<samp>shareFeedElement\uff08communityId\uff0c subjectId\uff0c feedElementType\uff0c originalFeedElementId\uff09<\/samp>\u6765\u5171\u4eab\u6e90\u9879\uff08\u8fd9\u662f\u4e00\u79cd \u8fdb\u6599\u5143\u4ef6\uff09\u4e0e \u7fa4\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ConnectApi.ChatterLike chatterLike = ConnectApi.ChatterFeeds.likeFeedElement(null, '0D5D0000000KuGh');<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u5171\u4eab\u6e90\u5143\u7d20\uff08\u5728\u7248\u672c 39.0 \u53ca\u66f4\u9ad8\u7248\u672c\u4e2d\uff09<\/h1>\n\n\n\n<p>\u8c03\u7528\u65b9\u6cd5\u4ee5\u5171\u4eab\u6e90\u5143\u7d20\u3002\u8c03\u7528\u00a0<samp>postFeedElement\uff08communityId\uff0c feedElement\uff09<\/samp>\u00a0\u5171\u4eab\u6e90 \u5143\u7d20\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ Define the FeedItemInput object to pass to postFeedElement\nConnectApi.FeedItemInput feedItemInput = new ConnectApi.FeedItemInput();\nfeedItemInput.subjectId = 'me';\nConnectApi.TextSegmentInput textSegmentInput = new ConnectApi.TextSegmentInput();\ntextSegmentInput.text = 'Look at this post I'm sharing.';\n\/\/ The MessageBodyInput object holds the text in the post\nConnectApi.MessageBodyInput messageBodyInput = new ConnectApi.MessageBodyInput();\nmessageBodyInput.messageSegments = new List&lt;ConnectApi.MessageSegmentInput&gt;();\nmessageBodyInput.messageSegments.add(textSegmentInput);\nfeedItemInput.body = messageBodyInput;\n\nConnectApi.FeedEntityShareCapabilityInput shareInput = new ConnectApi.FeedEntityShareCapabilityInput();\nshareInput.feedEntityId = '0D5R0000000SEbc';\nConnectApi.FeedElementCapabilitiesInput feedElementCapabilitiesInput = new\nConnectApi.FeedElementCapabilitiesInput();\nfeedElementCapabilitiesInput.feedEntityShare = shareInput;\nfeedItemInput.capabilities = feedElementCapabilitiesInput;\n\/\/ Post the feed item.\nConnectApi.FeedElement feedElement =\nConnectApi.ChatterFeeds.postFeedElement(Network.getNetworkId(), feedItemInput);<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u53d1\u9001\u79c1\u4fe1<\/h1>\n\n\n\n<p>\u8c03\u7528\u65b9\u6cd5\u4ee5\u53d1\u9001\u76f4\u63a5\u6d88\u606f\u3002\u8c03\u7528\u00a0<samp>postFeedElement\uff08communityId\uff0c feedElement\uff09<\/samp>\u00a0\u5411\u4e24\u4e2a\u4eba\u53d1\u9001\u76f4\u63a5\u6d88\u606f\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ Define the FeedItemInput object to pass to postFeedElement\nConnectApi.FeedItemInput feedItemInput = new ConnectApi.FeedItemInput();\n \nConnectApi.TextSegmentInput textSegmentInput = new ConnectApi.TextSegmentInput();\ntextSegmentInput.text = 'Thanks for attending my presentation test run this morning. Send me any feedback.';\n \n\/\/ The MessageBodyInput object holds the text in the post\nConnectApi.MessageBodyInput messageBodyInput = new ConnectApi.MessageBodyInput();\nmessageBodyInput.messageSegments = new List&lt;ConnectApi.MessageSegmentInput&gt;();\nmessageBodyInput.messageSegments.add(textSegmentInput);\nfeedItemInput.body = messageBodyInput;\n \n\/\/ The FeedElementCapabilitiesInput object holds the capabilities of the feed item.\n\/\/ For this feed item, we define a direct message capability to hold the member(s) and the subject.\n \nList&lt;String&gt; memberIds = new List&lt;String&gt;();\nmemberIds.add('005B00000016OUQ');\nmemberIds.add('005B0000001rIN6');\n \nConnectApi.DirectMessageCapabilityInput dmInput = new ConnectApi.DirectMessageCapabilityInput();\ndmInput.subject = 'Thank you!';\ndmInput.membersToAdd = memberIds;\n \nConnectApi.FeedElementCapabilitiesInput feedElementCapabilitiesInput = new ConnectApi.FeedElementCapabilitiesInput();\nfeedElementCapabilitiesInput.directMessage = dmInput;\n \nfeedItemInput.capabilities = feedElementCapabilitiesInput;\n \n\/\/ Post the feed item. \nConnectApi.FeedElement feedElement = ConnectApi.ChatterFeeds.postFeedElement(Network.getNetworkId(), feedItemInput);<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u53d1\u8868\u8bc4\u8bba<\/h1>\n\n\n\n<p>\u8c03\u7528\u65b9\u6cd5\u4ee5\u53d1\u8868\u8bc4\u8bba\u3002\u8c03\u7528\u00a0<samp>postCommentToFeedElement\uff08communityId\uff0c feedElementId\uff0c text\uff09<\/samp>\u00a0\u4ee5\u53d1\u5e03 \u5bf9 Feed \u7684\u7eaf\u6587\u672c\u6ce8\u91ca \u5143\u7d20\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ConnectApi.Comment comment = ConnectApi.ChatterFeeds.postCommentToFeedElement(null, '0D5D0000000KuGh', 'I agree with the proposal.' );<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u53d1\u8868\u8bc4\u8bba\u5e76\u63d0\u53ca<\/h1>\n\n\n\n<p>\u8c03\u7528\u6216\u4f7f\u7528 ConnectApiHelper \u5b58\u50a8\u5e93\u53d1\u5e03\u5e26\u6709 \u63d0\u5230\u3002\u60a8\u53ef\u4ee5\u901a\u8fc7\u4e24\u79cd\u65b9\u5f0f\u53d1\u5e03\u5e26\u6709\u63d0\u53ca\u7684\u8bc4\u8bba\u3002\u4f7f\u7528\u00a0GitHub \u4e0a\u7684 ConnectApiHelper \u5b58\u50a8\u5e93\u7f16\u5199\u5355\u884c \u7684\u4ee3\u7801\uff0c\u6216\u8005\u4f7f\u7528\u6b64\u793a\u4f8b\uff0c\u8be5\u793a\u4f8b\u8c03\u7528\u00a0<samp>postCommentToFeedElement\uff08communityId\uff0c feedElementId\uff0c comment\uff0c feedElementFileUpload\uff09\u3002<\/samp><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>String communityId = null;\nString feedElementId = '0D5D0000000KtW3';\n\nConnectApi.CommentInput commentInput = new ConnectApi.CommentInput();\nConnectApi.MentionSegmentInput mentionSegmentInput = new ConnectApi.MentionSegmentInput();\nConnectApi.MessageBodyInput messageBodyInput = new ConnectApi.MessageBodyInput();\nConnectApi.TextSegmentInput textSegmentInput = new ConnectApi.TextSegmentInput();\n\nmessageBodyInput.messageSegments = new List&lt;ConnectApi.MessageSegmentInput&gt;();\n\ntextSegmentInput.text = 'Does anyone in this group have an idea? ';\nmessageBodyInput.messageSegments.add(textSegmentInput);\n\nmentionSegmentInput.id = '005D00000000oOT';\nmessageBodyInput.messageSegments.add(mentionSegmentInput);\n\ncommentInput.body = messageBodyInput;\n\nConnectApi.Comment commentRep = ConnectApi.ChatterFeeds.postCommentToFeedElement(communityId, feedElementId, commentInput, null);<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u4f7f\u7528\u73b0\u6709\u6587\u4ef6\u53d1\u8868\u8bc4\u8bba<\/h1>\n\n\n\n<p>\u62e8\u6253\u7535\u8bdd\u4ee5\u4f7f\u7528\u5df2\u4e0a\u4f20\u7684\u6587\u4ef6\u53d1\u8868\u8bc4\u8bba\u3002\u8981\u53d1\u8868\u8bc4\u8bba\u5e76\u9644\u52a0\u73b0\u6709\u6587\u4ef6\uff08\u5df2\u4e0a\u4f20\u5230 Salesforce\uff09 \u6dfb\u52a0\u5230\u8bc4\u8bba\u4e2d\uff0c\u521b\u5efa\u4e00\u4e2a\u5bf9\u8c61\u4ee5\u4f20\u9012\u7ed9\u00a0<samp>postCommentToFeedElement\uff08communityId\uff0c feedElementId\uff0c \u8bc4\u8bba feedElementFileUpload\uff09\u3002<\/samp><\/p>\n\n\n\n<p><samp>ConnectApi.CommentInput<\/samp><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>String feedElementId = '0D5D0000000KtW3';\n\nConnectApi.CommentInput commentInput = new ConnectApi.CommentInput();\n\nConnectApi.MessageBodyInput messageBodyInput = new ConnectApi.MessageBodyInput();\nConnectApi.TextSegmentInput textSegmentInput = new ConnectApi.TextSegmentInput();\n\ntextSegmentInput.text = 'I attached this file from Salesforce Files.';\n\nmessageBodyInput.messageSegments = new List&lt;ConnectApi.MessageSegmentInput&gt;();\nmessageBodyInput.messageSegments.add(textSegmentInput);\ncommentInput.body = messageBodyInput;\n\nConnectApi.CommentCapabilitiesInput commentCapabilitiesInput = new ConnectApi.CommentCapabilitiesInput();\nConnectApi.ContentCapabilityInput contentCapabilityInput = new ConnectApi.ContentCapabilityInput();\n\ncommentCapabilitiesInput.content = contentCapabilityInput;\ncontentCapabilityInput.contentDocumentId = '069D00000001rNJ';\n\ncommentInput.capabilities = commentCapabilitiesInput;\n\nConnectApi.Comment commentRep = ConnectApi.ChatterFeeds.postCommentToFeedElement(Network.getNetworkId(), feedElementId, commentInput, null);<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u4f7f\u7528\u65b0\u6587\u4ef6\u53d1\u8868\u8bc4\u8bba<\/h1>\n\n\n\n<p>\u8c03\u7528\u65b9\u6cd5\u4ee5\u4f7f\u7528\u65b0\u6587\u4ef6\u53d1\u5e03\u6ce8\u91ca\u3002\u8981\u53d1\u5e03\u8bc4\u8bba\u5e76\u4e0a\u4f20\u65b0\u6587\u4ef6\u5e76\u5c06\u5176\u9644\u52a0\u5230\u8bc4\u8bba\u4e2d\uff0c\u8bf7\u521b\u5efa\u4e00\u4e2a\u5bf9\u8c61\u548c\u4e00\u4e2a\u8981\u4f20\u9012\u7ed9\u00a0<samp>postCommentToFeedElement\uff08communityId\uff0c feedElementId\uff0c comment\uff0c feedElementFileUpload\uff09<\/samp>\u00a0\u65b9\u6cd5\u3002<\/p>\n\n\n\n<p><samp>ConnectApi.CommentInput<\/samp><samp>ConnectApi.BinaryInput<\/samp><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>String feedElementId = '0D5D0000000KtW3';\n\nConnectApi.CommentInput commentInput = new ConnectApi.CommentInput();\n\nConnectApi.MessageBodyInput messageBodyInput = new ConnectApi.MessageBodyInput();\nConnectApi.TextSegmentInput textSegmentInput = new ConnectApi.TextSegmentInput();\n\ntextSegmentInput.text = 'Enjoy this new file.';\n\nmessageBodyInput.messageSegments = new List&lt;ConnectApi.MessageSegmentInput&gt;();\nmessageBodyInput.messageSegments.add(textSegmentInput);\ncommentInput.body = messageBodyInput;\n\nConnectApi.CommentCapabilitiesInput commentCapabilitiesInput = new ConnectApi.CommentCapabilitiesInput();\nConnectApi.ContentCapabilityInput contentCapabilityInput = new ConnectApi.ContentCapabilityInput();\n\ncommentCapabilitiesInput.content = contentCapabilityInput;\ncontentCapabilityInput.title = 'Title';\n\ncommentInput.capabilities = commentCapabilitiesInput;\n\nString text = 'These are the contents of the new file.';\nBlob myBlob = Blob.valueOf(text);\nConnectApi.BinaryInput binInput = new ConnectApi.BinaryInput(myBlob, 'text\/plain', 'fileName');\n\nConnectApi.Comment commentRep = ConnectApi.ChatterFeeds.postCommentToFeedElement(Network.getNetworkId(), feedElementId, commentInput, binInput);<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u53d1\u5e03\u5e26\u6709\u5185\u5d4c\u56fe\u50cf\u7684\u5bcc\u6587\u672c\u8bc4\u8bba<\/h1>\n\n\n\n<p>\u8fdb\u884c\u8c03\u7528\u6216\u4f7f\u7528 ConnectApiHelper \u5b58\u50a8\u5e93\u53d1\u5e03\u8bc4\u8bba\uff0c\u5176\u4e2d\u5305\u542b \u4e0a\u4f20\u7684\u5185\u5d4c\u56fe\u50cf\u3002\u60a8\u53ef\u4ee5\u901a\u8fc7\u4e24\u79cd\u65b9\u5f0f\u53d1\u5e03\u5e26\u6709\u5185\u5d4c\u56fe\u50cf\u548c\u63d0\u53ca\u7684\u5bcc\u6587\u672c\u8bc4\u8bba\u3002\u4f7f\u7528\u00a0GitHub \u4e0a\u7684 ConnectApiHelper \u5b58\u50a8\u5e93\u7f16\u5199\u5355\u884c \u7684\u4ee3\u7801\uff0c\u6216\u8005\u4f7f\u7528\u6b64\u793a\u4f8b\uff0c\u8be5\u793a\u4f8b\u8c03\u7528\u00a0<samp>postCommentToFeedElement\uff08communityId\uff0c feedElementId\uff0c comment\uff0c feedElementFileUpload\uff09\u3002<\/samp>\u5728\u6b64\u793a\u4f8b\u4e2d\uff0c\u56fe\u50cf\u6587\u4ef6\u5df2\u5b58\u5728 \u5df2\u4e0a\u4f20\u5230\u7684\u5185\u5bb9 Salesforce\u7684\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>String communityId = null;\nString feedElementId = '0D5R0000000SBEr';\nString imageId = '069R00000000IgQ';\nString mentionedUserId = '005R0000000DiMz'; \n\nConnectApi.CommentInput input = new ConnectApi.CommentInput();\nConnectApi.MessageBodyInput messageInput = new ConnectApi.MessageBodyInput();\nConnectApi.TextSegmentInput textSegment;\nConnectApi.MentionSegmentInput mentionSegment;\nConnectApi.MarkupBeginSegmentInput markupBeginSegment;\nConnectApi.MarkupEndSegmentInput markupEndSegment;\nConnectApi.InlineImageSegmentInput inlineImageSegment;\n\nmessageInput.messageSegments = new List&lt;ConnectApi.MessageSegmentInput&gt;();\n\n\nmarkupBeginSegment = new ConnectApi.MarkupBeginSegmentInput();\nmarkupBeginSegment.markupType = ConnectApi.MarkupType.Bold;\nmessageInput.messageSegments.add(markupBeginSegment);\n\ntextSegment = new ConnectApi.TextSegmentInput();\ntextSegment.text = 'Hello ';\nmessageInput.messageSegments.add(textSegment);\n\nmentionSegment = new ConnectApi.MentionSegmentInput();\nmentionSegment.id = mentionedUserId;\nmessageInput.messageSegments.add(mentionSegment);\n\ntextSegment = new ConnectApi.TextSegmentInput();\ntextSegment.text = '!';\nmessageInput.messageSegments.add(textSegment);\n\nmarkupEndSegment = new ConnectApi.MarkupEndSegmentInput();\nmarkupEndSegment.markupType = ConnectApi.MarkupType.Bold;\nmessageInput.messageSegments.add(markupEndSegment);\n\ninlineImageSegment = new ConnectApi.InlineImageSegmentInput();\ninlineImageSegment.altText = 'image one';\ninlineImageSegment.fileId = imageId;\nmessageInput.messageSegments.add(inlineImageSegment);\n\ninput.body = messageInput;\n\nConnectApi.ChatterFeeds.postCommentToFeedElement(communityId, feedElementId, input, null);<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u53d1\u5e03\u5e26\u6709\u4ee3\u7801\u5757\u7684\u5bcc\u6587\u672c\u6e90\u6ce8\u91ca<\/h1>\n\n\n\n<p>\u8c03\u7528\u65b9\u6cd5\u4ee5\u4f7f\u7528\u4ee3\u7801\u5757\u53d1\u5e03\u6ce8\u91ca\u3002\u6b64\u793a\u4f8b\u8c03\u7528\u00a0<samp>postCommentToFeedElement\uff08communityId\uff0c feedElementId\uff0c comment\uff0c feedElementFileUpload\uff09<\/samp>\u00a0\u53d1\u5e03\u5e26\u6709\u4ee3\u7801\u7684\u8bc4\u8bba \u5757\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>String communityId = null;\nString feedElementId = '0D5R0000000SBEr';\nString codeSnippet = '&lt;html&gt;\\n\\t&lt;body&gt;\\n\\t\\tHello, world!\\n\\t&lt;\/body&gt;\\n&lt;\/html&gt;';\n\nConnectApi.CommentInput input = new ConnectApi.CommentInput();\nConnectApi.MessageBodyInput messageInput = new ConnectApi.MessageBodyInput();\nConnectApi.TextSegmentInput textSegment;\nConnectApi.MarkupBeginSegmentInput markupBeginSegment;\nConnectApi.MarkupEndSegmentInput markupEndSegment;\n\nmessageInput.messageSegments = new List&lt;ConnectApi.MessageSegmentInput&gt;();\n\nmarkupBeginSegment = new ConnectApi.MarkupBeginSegmentInput();\nmarkupBeginSegment.markupType = ConnectApi.MarkupType.Code;\nmessageInput.messageSegments.add(markupBeginSegment);\n\ntextSegment = new ConnectApi.TextSegmentInput();\ntextSegment.text = codeSnippet;\nmessageInput.messageSegments.add(textSegment);\n\nmarkupEndSegment = new ConnectApi.MarkupEndSegmentInput();\nmarkupEndSegment.markupType = ConnectApi.MarkupType.Code;\nmessageInput.messageSegments.add(markupEndSegment);\n\ninput.body = messageInput;\n\nConnectApi.ChatterFeeds.postCommentToFeedElement(communityId, feedElementId, input, null);<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u7f16\u8f91\u6279\u6ce8<\/h1>\n\n\n\n<p>\u8c03\u7528\u65b9\u6cd5\u4ee5\u7f16\u8f91\u6ce8\u91ca\u3002\u8c03\u7528\u00a0<samp>updateComment\uff08communityId\uff0c commentId\uff0c comment\uff09<\/samp>\u00a0\u6765\u7f16\u8f91 \u8bc4\u8bba\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>String commentId;\nString communityId = Network.getNetworkId();\n\n\/\/ Get the last feed item created by the context user.\nList&lt;FeedItem&gt; feedItems = &#91;SELECT Id FROM FeedItem WHERE CreatedById = :UserInfo.getUserId() ORDER BY CreatedDate DESC];\nif (feedItems.isEmpty()) {\n    \/\/ Return null within anonymous apex.\n    return null;\n}\nString feedElementId = feedItems&#91;0].id;\n\nConnectApi.CommentPage commentPage = ConnectApi.ChatterFeeds.getCommentsForFeedElement(communityId, feedElementId);\nif (commentPage.items.isEmpty()) {\n    \/\/ Return null within anonymous apex.\n    return null;\n}\ncommentId = commentPage.items&#91;0].id;\n\nConnectApi.FeedEntityIsEditable isEditable = ConnectApi.ChatterFeeds.isCommentEditableByMe(communityId, commentId);\n\nif (isEditable.isEditableByMe == true){\n    ConnectApi.CommentInput commentInput = new ConnectApi.CommentInput();\n    ConnectApi.MessageBodyInput messageBodyInput = new ConnectApi.MessageBodyInput();\n    ConnectApi.TextSegmentInput textSegmentInput = new ConnectApi.TextSegmentInput();\n\n    messageBodyInput.messageSegments = new List&lt;ConnectApi.MessageSegmentInput&gt;();\n\n    textSegmentInput.text = 'This is my edited comment.';\n    messageBodyInput.messageSegments.add(textSegmentInput);\n\n    commentInput.body = messageBodyInput;\n\n    ConnectApi.Comment editedComment = ConnectApi.ChatterFeeds.updateComment(communityId, commentId, commentInput);\n}<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u5173\u6ce8\u8bb0\u5f55<\/h1>\n\n\n\n<p>\u8c03\u7528\u65b9\u6cd5\u4ee5\u8ddf\u8e2a\u8bb0\u5f55\u3002\u8c03\u7528\u00a0<samp>follow\uff08communityId\uff0c userId\uff0c subjectId\uff09<\/samp>\u00a0\u6765\u8ddf\u968f \u8bb0\u5f55\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ChatterUsers.ConnectApi.Subscription subscriptionToRecord = ConnectApi.ChatterUsers.follow(null, 'me', '001RR000002G4Y0');<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u53d6\u6d88\u5173\u6ce8\u8bb0\u5f55<\/h1>\n\n\n\n<p>\u8c03\u7528\u65b9\u6cd5\u4ee5\u505c\u6b62\u5173\u6ce8\u8bb0\u5f55\u3002\u5f53\u60a8\u5173\u6ce8\u8bb0\u5f55\uff08\u5982\u7528\u6237\uff09\u65f6\uff0c\u5bf9 \u7684\u8c03\u7528\u5c06\u8fd4\u56de\u4e00\u4e2a\u5bf9\u8c61\u3002\u82e5\u8981\u53d6\u6d88\u5173\u6ce8\u8bb0\u5f55\uff0c\u8bf7\u5c06\u8be5\u5bf9\u8c61\u7684\u5c5e\u6027\u4f20\u9012\u7ed9\u00a0<samp>deleteSubscription\uff08communityId\uff0c subscriptionId\uff09\u3002<\/samp><\/p>\n\n\n\n<p><samp>ConnectApi.ChatterUsers.follow<\/samp><samp>ConnectApi.Subscription<\/samp><samp>id<\/samp><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ConnectApi.Chatter.deleteSubscription(null, '0E8RR0000004CnK0AU');<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u83b7\u53d6\u5b58\u50a8\u5e93<\/h1>\n\n\n\n<p>\u8c03\u7528\u65b9\u6cd5\u4ee5\u83b7\u53d6\u5b58\u50a8\u5e93\u3002\u8c03\u7528\u00a0<samp>getRepository\uff08repositoryId\uff09<\/samp>\u00a0\u83b7\u53d6 \u5b58\u50a8 \u5e93\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>final string repositoryId = '0XCxx0000000123GAA';\nfinal ConnectApi.ContentHubRepository repository = ConnectApi.ContentHub.getRepository(repositoryId);<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u83b7\u53d6\u5b58\u50a8\u5e93<\/h1>\n\n\n\n<p>\u8c03\u7528\u65b9\u6cd5\u4ee5\u83b7\u53d6\u6240\u6709\u5b58\u50a8\u5e93\u3002\u8c03\u7528\u00a0<samp>getRepositories\uff08\uff09<\/samp>\u00a0\u4ee5\u83b7\u53d6\u6240\u6709\u5b58\u50a8\u5e93\u5e76\u83b7\u53d6\u7b2c\u4e00\u4e2a SharePoint \u5728\u7ebf\u5b58\u50a8\u5e93 \u53d1\u73b0\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>final string sharePointOnlineProviderType ='ContentHubSharepointOffice365';\nfinal ConnectApi.ContentHubRepositoryCollection repositoryCollection = ConnectApi.ContentHub.getRepositories();\nConnectApi.ContentHubRepository sharePointOnlineRepository = null;\nfor(ConnectApi.ContentHubRepository repository : repositoryCollection.repositories){\n   if(sharePointOnlineProviderType.equalsIgnoreCase(repository.providerType.type)){\n      sharePointOnlineRepository = repository;\n      break;\n   }\n}<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u83b7\u53d6\u5141\u8bb8\u7684\u9879\u76ee\u7c7b\u578b<\/h1>\n\n\n\n<p>\u8c03\u7528\u65b9\u6cd5\u4ee5\u83b7\u53d6\u5141\u8bb8\u7684\u9879\u7c7b\u578b\u3002\u4f7f\u7528\u00a0<samp>of \u8c03\u7528 getAllowedItemTypes\uff08repositoryId\uff0c repositoryFolderId\uff0c filter\uff09<\/samp>\u00a0\u4ee5\u83b7\u53d6\u6587\u4ef6\u7684\u7b2c\u4e00\u4e2a\u3002\u7528\u6237\u53ef\u4ee5\u521b\u5efa\u7684\u4e0a\u4e0b\u6587 \u5916\u90e8\u5b58\u50a8\u5e93\u6587\u4ef6\u5939\u4e2d\u5141\u8bb8\u7684\u6587\u4ef6 \u7cfb\u7edf\u3002<\/p>\n\n\n\n<p><samp>filter<\/samp><samp>FilesOnly<\/samp><samp>ConnectApi.ContentHubItemTypeSummary.id<\/samp><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>final ConnectApi.ContentHubAllowedItemTypeCollection allowedItemTypesColl = ConnectApi.ContentHub.getAllowedItemTypes(repositoryId, repositoryFolderId, ConnectApi.ContentHubItemType.FilesOnly);\nfinal List&lt;ConnectApi.ContentHubItemTypeSummary&gt; allowedItemTypes = allowedItemTypesColl.allowedItemTypes;\nstring allowedFileItemTypeId = null;\nif(allowedItemTypes.size() &gt; 0){\n   ConnectApi.ContentHubItemTypeSummary allowedItemTypeSummary = allowedItemTypes.get(0);\n   allowedFileItemTypeId = allowedItemTypeSummary.id;\n}<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u83b7\u53d6\u9884\u89c8<\/h1>\n\n\n\n<p>\u8c03\u7528\u65b9\u6cd5\u4ee5\u83b7\u53d6\u6240\u6709\u652f\u6301\u7684\u9884\u89c8\u683c\u5f0f\u53ca\u5176\u5404\u81ea\u7684\u9884\u89c8\u683c\u5f0f URL\u3002\u8c03\u7528\u00a0<samp>getPreviews\uff08repositoryId\uff0c repositoryFileId\uff09<\/samp>\u00a0\u83b7\u53d6\u6240\u6709\u652f\u6301\u7684\u9884\u89c8\u683c\u5f0f\u53ca\u5176 \u5404\u81ea\u7684 URL \u548c\u6f14\u7ece\u7248\u6570\u91cf\u3002\u5bf9\u4e8e\u6bcf\u79cd\u53d7\u652f\u6301\u7684\u9884\u89c8\u683c\u5f0f\uff0c\u6211\u4eec\u90fd\u4f1a\u663e\u793a \u6f14\u7ece\u7248 URL \u53ef\u7528\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>final String gDriveRepositoryId = '0XCxx00000000ODGAY', gDriveFileId = 'document:1-zcA1BaeoQbo2_yNFiHCcK6QJTPmOke-kHFC4TYg3rk';\nfinal ConnectApi.FilePreviewCollection previewsCollection = ConnectApi.ContentHub.getPreviews(gDriveRepositoryId, gDriveFileId);\nfor(ConnectApi.FilePreview filePreview : previewsCollection.previews){\n   System.debug(String.format('Preview - URL: \\'\\'{0}\\'\\', format: \\'\\'{1}\\'\\', nbr of renditions for this format: {2}', new String&#91;]{ filePreview.url, filePreview.format.name(),String.valueOf(filePreview.previewUrls.size())}));\n   for(ConnectApi.FilePreviewUrl filePreviewUrl : filePreview.previewUrls){\n      System.debug('-----&gt; Rendition URL: ' + filePreviewUrl.previewUrl);\n      }\n}<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u83b7\u53d6\u6587\u4ef6\u9884\u89c8<\/h1>\n\n\n\n<p>\u8c03\u7528\u65b9\u6cd5\u4ee5\u83b7\u53d6\u6587\u4ef6\u9884\u89c8\u3002\u8c03\u7528\u00a0<samp>getFilePreview\uff08repositoryId\uff0c repositoryFileId\uff0c formatType\uff09<\/samp>\u00a0\u66ff\u6362\u4e3a of \u6765\u83b7\u53d6 \u7f29\u7565\u56fe\u683c\u5f0f\u9884\u89c8\u53ca\u5176\u5404\u81ea\u7684 URL \u548c\u7f29\u7565\u56fe\u6f14\u7ece\u7248\u7684\u6570\u91cf\u3002\u4e3a \u6bcf\u79cd\u7f29\u7565\u56fe\u683c\u5f0f\uff0c\u6211\u4eec\u90fd\u4f1a\u663e\u793a\u6bcf\u4e2a\u6f14\u7ece\u7248 URL \u53ef\u7528\u3002<\/p>\n\n\n\n<p><samp>formatType<\/samp><samp>Thumbnail<\/samp><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>final String gDriveRepositoryId = '0XCxx00000000ODGAY', gDriveFileId = 'document:1-zcA1BaeoQbo2_yNFiHCcK6QJTPmOke-kHFC4TYg3rk';\nfinal ConnectApi.FilePreviewCollection previewsCollection = ConnectApi.ContentHub.getPreviews(gDriveRepositoryId, gDriveFileId);\nfor(ConnectApi.FilePreview filePreview : previewsCollection.previews){\n   System.debug(String.format('Preview - URL: \\'\\'{0}\\'\\', format: \\'\\'{1}\\'\\', nbr of renditions for this format: {2}', new String&#91;]{ filePreview.url, filePreview.format.name(),String.valueOf(filePreview.previewUrls.size())}));\n   for(ConnectApi.FilePreviewUrl filePreviewUrl : filePreview.previewUrls){\n      System.debug('-----&gt; Rendition URL: ' + filePreviewUrl.previewUrl);\n      }\n}<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u83b7\u53d6\u5b58\u50a8\u5e93\u6587\u4ef6\u5939\u9879<\/h1>\n\n\n\n<p>\u8c03\u7528\u65b9\u6cd5\u4ee5\u83b7\u53d6\u5b58\u50a8\u5e93\u6587\u4ef6\u5939\u9879\u7684\u96c6\u5408\u3002\u8c03\u7528\u00a0<samp>getRepositoryFolderItems\uff08repositoryId\uff0c repositoryFolderId\uff09<\/samp>\u00a0\u83b7\u53d6 \u5b58\u50a8\u5e93\u6587\u4ef6\u5939\u4e2d\u7684\u9879\u76ee\u96c6\u5408\u3002\u5bf9\u4e8e\u6587\u4ef6\uff0c\u6211\u4eec\u663e\u793a\u6587\u4ef6\u7684\u540d\u79f0\u3001\u5927\u5c0f\u3001\u5916\u90e8 URL \u548c\u4e0b\u8f7d URL\u3002\u5bf9\u4e8e\u6587\u4ef6\u5939\uff0c\u6211\u4eec\u663e\u793a\u6587\u4ef6\u5939\u7684\u540d\u79f0\u3001\u63cf\u8ff0\u548c\u5916\u90e8 \u7f51\u5740\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>final String gDriveRepositoryId = '0XCxx00000000ODGAY', gDriveFolderId = 'folder:0B0lTys1KmM3sSVJ2bjIzTGFqSWs';\nfinal ConnectApi.RepositoryFolderItemsCollection folderItemsColl = ConnectApi.ContentHub.getRepositoryFolderItems(gDriveRepositoryId,gDriveFolderId);\nfinal List&lt;ConnectApi.RepositoryFolderItem&gt; folderItems = folderItemsColl.items;\nSystem.debug('Number of items in repository folder: ' + folderItems.size());\nfor(ConnectApi.RepositoryFolderItem item : folderItems){\n   ConnectApi.RepositoryFileSummary fileSummary = item.file;\n   if(fileSummary != null){\n      System.debug(String.format('File item - name: \\'\\'{0}\\'\\', size: {1}, external URL: \\'\\'{2}\\'\\', download URL: \\'\\'{3}\\'\\'', new String&#91;]{ fileSummary.name, String.valueOf(fileSummary.contentSize), fileSummary.externalDocumentUrl, fileSummary.downloadUrl}));\n      }else{\n         ConnectApi.RepositoryFolderSummary folderSummary = item.folder;\n         System.debug(String.format('Folder item - name: \\'\\'{0}\\'\\', description: \\'\\'{1}\\'\\'',  new String&#91;]{ folderSummary.name, folderSummary.description}));\n      }\n}<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u83b7\u53d6\u5b58\u50a8\u5e93\u6587\u4ef6\u5939<\/h1>\n\n\n\n<p>\u8c03\u7528\u65b9\u6cd5\u4ee5\u83b7\u53d6\u5b58\u50a8\u5e93\u6587\u4ef6\u5939\u3002\u8c03\u7528\u00a0<samp>getRepositoryFolder\uff08repositoryId\uff0c repositoryFolderId\uff09<\/samp>\u00a0\u83b7\u53d6\u4ed3\u5e93 \u6587\u4ef6\u5939\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>final String gDriveRepositoryId = '0XCxx00000000ODGAY', gDriveFolderId = 'folder:0B0lTys1KmM3sSVJ2bjIzTGFqSWs';\nfinal ConnectApi.RepositoryFolderDetail folder = ConnectApi.ContentHub.getRepositoryFolder(gDriveRepositoryId, gDriveFolderId);\nSystem.debug(String.format('Folder - name: \\'\\'{0}\\'\\', description: \\'\\'{1}\\'\\', external URL: \\'\\'{2}\\'\\', folder items URL: \\'\\'{3}\\'\\'', \n   new String&#91;]{ folder.name, folder.description, folder.externalFolderUrl, folder.folderItemsUrl}));<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u83b7\u53d6\u6ca1\u6709\u6743\u9650\u4fe1\u606f\u7684\u5b58\u50a8\u5e93\u6587\u4ef6<\/h1>\n\n\n\n<p>\u8c03\u7528\u65b9\u6cd5\u83b7\u53d6\u6ca1\u6709\u6743\u9650\u4fe1\u606f\u7684\u5b58\u50a8\u5e93\u6587\u4ef6\u3002\u8c03\u7528\u00a0<samp>getRepositoryFile\uff08repositoryId\uff0c repositoryFileId\uff09<\/samp>\u00a0\u83b7\u53d6\u4ed3\u5e93 \u6ca1\u6709\u6743\u9650\u7684\u6587\u4ef6 \u4fe1\u606f\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>final String gDriveRepositoryId = '0XCxx00000000ODGAY', gDriveFileId = 'file:0B0lTys1KmM3sTmxKNjVJbWZja00';\nfinal ConnectApi.RepositoryFileDetail file = ConnectApi.ContentHub.getRepositoryFile(gDriveRepositoryId, gDriveFileId);\nSystem.debug(String.format('File - name: \\'\\'{0}\\'\\', size: {1}, external URL: \\'\\'{2}\\'\\', download URL: \\'\\'{3}\\'\\'', \n   new String&#91;]{ file.name, String.valueOf(file.contentSize), file.externalDocumentUrl, file.downloadUrl}));<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u83b7\u53d6\u5305\u542b\u6743\u9650\u4fe1\u606f\u7684\u5b58\u50a8\u5e93\u6587\u4ef6<\/h1>\n\n\n\n<p>\u8c03\u7528\u65b9\u6cd5\u4ee5\u83b7\u53d6\u5305\u542b\u6743\u9650\u4fe1\u606f\u7684\u5b58\u50a8\u5e93\u6587\u4ef6\u3002\u8c03\u7528\u00a0<samp>getRepositoryFile\uff08repositoryId\uff0c repositoryFileId\uff0c includeExternalFilePermissionsInfo\uff09<\/samp>\u00a0\u83b7\u53d6\u5b58\u50a8\u5e93\u6587\u4ef6 \u6743\u9650 \u4fe1\u606f\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>final String gDriveRepositoryId = '0XCxx00000000ODGAY', gDriveFileId = 'file:0B0lTys1KmM3sTmxKNjVJbWZja00';\n\nfinal ConnectApi.RepositoryFileDetail file = ConnectApi.ContentHub.getRepositoryFile(gDriveRepositoryId, gDriveFileId, true);\nSystem.debug(String.format('File - name: \\'\\'{0}\\'\\', size: {1}, external URL: \\'\\'{2}\\'\\', download URL: \\'\\'{3}\\'\\'', new String&#91;]{ file.name, String.valueOf(file.contentSize), file.externalDocumentUrl, file.downloadUrl}));\nfinal ConnectApi.ExternalFilePermissionInformation externalFilePermInfo = file.externalFilePermissionInformation;\n\n\/\/permission types\nfinal List&lt;ConnectApi.ContentHubPermissionType&gt; permissionTypes = externalFilePermInfo.externalFilePermissionTypes;\nfor(ConnectApi.ContentHubPermissionType permissionType : permissionTypes){\n   System.debug(String.format('Permission type - id: \\'\\'{0}\\'\\', label: \\'\\'{1}\\'\\'', new String&#91;]{ permissionType.id, permissionType.label}));\n}\n\n\/\/permission groups\nfinal List&lt;ConnectApi.RepositoryGroupSummary&gt; groups = externalFilePermInfo.repositoryPublicGroups;\nfor(ConnectApi.RepositoryGroupSummary ggroup : groups){\n   System.debug(String.format('Group - id: \\'\\'{0}\\'\\', name: \\'\\'{1}\\'\\', type: \\'\\'{2}\\'\\'', new String&#91;]{ ggroup.id, ggroup.name, ggroup.type.name()}));\n}<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u521b\u5efa\u4e0d\u5e26\u5185\u5bb9\u7684\u5b58\u50a8\u5e93\u6587\u4ef6\uff08\u4ec5\u9650\u5143\u6570\u636e\uff09<\/h1>\n\n\n\n<p>\u8c03\u7528\u65b9\u6cd5\u4ee5\u5728 Google Drive \u4e2d\u521b\u5efa\u6ca1\u6709\u4e8c\u8fdb\u5236\u5185\u5bb9\uff08\u4ec5\u9650\u5143\u6570\u636e\uff09\u7684\u6587\u4ef6 \u5b58\u50a8\u5e93\u6587\u4ef6\u5939\u3002\u8c03\u7528\u00a0<samp>addRepositoryItem\uff08repositoryId\uff0c repositoryFolderId\uff0c file\uff09<\/samp>\u00a0\u521b\u5efa\u4e00\u4e2a Google \u4e91\u7aef\u786c\u76d8\u5b58\u50a8\u5e93\u6587\u4ef6\u5939\u4e2d\u6ca1\u6709\u4e8c\u8fdb\u5236\u5185\u5bb9\uff08\u4ec5\u9650\u5143\u6570\u636e\uff09\u7684\u6587\u4ef6\u3002\u4e4b\u540e \u6587\u4ef6\uff0c\u6211\u4eec\u663e\u793a\u6587\u4ef6\u7684 ID\u3001\u540d\u79f0\u3001\u63cf\u8ff0\u3001\u5916\u90e8 URL \u548c\u4e0b\u8f7d \u7f51\u5740\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>final String gDriveRepositoryId = '0XCxx00000000ODGAY', gDriveFolderId = 'folder:0B0lTys1KmM3sSVJ2bjIzTGFqSWs';\n\nfinal ConnectApi.ContentHubItemInput newItem = new ConnectApi.ContentHubItemInput();\nnewItem.itemTypeId = 'document'; \/\/see getAllowedTypes for any file item types available for creation\/update\nnewItem.fields = new List&lt;ConnectApi.ContentHubFieldValueInput&gt;();\n\n\/\/Metadata: name field\nfinal ConnectApi.ContentHubFieldValueInput fieldValueInput = new ConnectApi.ContentHubFieldValueInput();\nfieldValueInput.name = 'name';\nfieldValueInput.value = 'new folder item name.txt';\nnewItem.fields.add(fieldValueInput);\n\n\/\/Metadata: description field\nfinal ConnectApi.ContentHubFieldValueInput fieldValueInputDesc = new ConnectApi.ContentHubFieldValueInput();\nfieldValueInputDesc.name = 'description';\nfieldValueInputDesc.value = 'It does describe it';\nnewItem.fields.add(fieldValueInputDesc);\n\nfinal ConnectApi.RepositoryFolderItem newFolderItem = ConnectApi.ContentHub.addRepositoryItem(gDriveRepositoryId, gDriveFolderId, newItem);\nfinal ConnectApi.RepositoryFileSummary newFile = newFolderItem.file;\nSystem.debug(String.format('New file - id: \\'\\'{0}\\'\\', name: \\'\\'{1}\\'\\', description: \\'\\'{2}\\'\\' \\n external URL: \\'\\'{3}\\'\\', download URL: \\'\\'{4}\\'\\'', new String&#91;]{ newFile.id, newFile.name, newFile.description, newFile.externalDocumentUrl, newFile.downloadUrl}));<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u521b\u5efa\u5305\u542b\u5185\u5bb9\u7684\u5b58\u50a8\u5e93\u6587\u4ef6<\/h1>\n\n\n\n<p>\u8c03\u7528\u65b9\u6cd5\u4ee5\u5728 Google Drive \u5b58\u50a8\u5e93\u4e2d\u521b\u5efa\u5305\u542b\u4e8c\u8fdb\u5236\u5185\u5bb9\u7684\u6587\u4ef6 \u6587\u4ef6\u5939\u3002\u8c03\u7528\u00a0<samp>addRepositoryItem\uff08repositoryId\uff0c repositoryFolderId\uff0c file\uff0c filedata\uff09<\/samp>\u00a0\u6765 \u5728 Google Drive \u5b58\u50a8\u5e93\u6587\u4ef6\u5939\u4e2d\u521b\u5efa\u5305\u542b\u4e8c\u8fdb\u5236\u5185\u5bb9\u7684\u6587\u4ef6\u3002\u6587\u4ef6\u88ab created\uff0c\u6211\u4eec\u663e\u793a\u6587\u4ef6\u7684 ID\u3001\u540d\u79f0\u3001\u63cf\u8ff0\u3001\u5916\u90e8 URL \u548c\u4e0b\u8f7d \u7f51\u5740\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>final String gDriveRepositoryId = '0XCxx00000000ODGAY', gDriveFolderId = 'folder:0B0lTys1KmM3sSVJ2bjIzTGFqSWs';\n\nfinal ConnectApi.ContentHubItemInput newItem = new ConnectApi.ContentHubItemInput();\nnewItem.itemTypeId = 'document'; \/\/see getAllowedTypes for any file item types available for creation\/update\nnewItem.fields = new List&lt;ConnectApi.ContentHubFieldValueInput&gt;();\n\n\/\/Metadata: name field\nFinal String newFileName = 'new folder item name.txt';\nfinal ConnectApi.ContentHubFieldValueInput fieldValueInput = new ConnectApi.ContentHubFieldValueInput();\nfieldValueInput.name = 'name';\nfieldValueInput.value = newFileName;\nnewItem.fields.add(fieldValueInput);\n\n\/\/Metadata: description field\nfinal ConnectApi.ContentHubFieldValueInput fieldValueInputDesc = new ConnectApi.ContentHubFieldValueInput();\nfieldValueInputDesc.name = 'description';\nfieldValueInputDesc.value = 'It does describe it';\nnewItem.fields.add(fieldValueInputDesc);\n\n\/\/Binary content\nfinal Blob newFileBlob = Blob.valueOf('awesome content for brand new file');\nfinal String newFileMimeType = 'text\/plain';\nfinal ConnectApi.BinaryInput fileBinaryInput = new ConnectApi.BinaryInput(newFileBlob, newFileMimeType, newFileName);\n\nfinal ConnectApi.RepositoryFolderItem newFolderItem = ConnectApi.ContentHub.addRepositoryItem(gDriveRepositoryId, gDriveFolderId, newItem, fileBinaryInput);\nfinal ConnectApi.RepositoryFileSummary newFile = newFolderItem.file;\nSystem.debug(String.format('New file - id: \\'\\'{0}\\'\\', name: \\'\\'{1}\\'\\', description: \\'\\'{2}\\'\\' \\n external URL: \\'\\'{3}\\'\\', download URL: \\'\\'{4}\\'\\'', new String&#91;]{ newFile.id, newFile.name, newFile.description, newFile.externalDocumentUrl, newFile.downloadUrl}));<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u66f4\u65b0\u4e0d\u5e26\u5185\u5bb9\u7684\u5b58\u50a8\u5e93\u6587\u4ef6\uff08\u4ec5\u9650\u5143\u6570\u636e\uff09<\/h1>\n\n\n\n<p>\u8c03\u7528\u65b9\u6cd5\u66f4\u65b0\u5b58\u50a8\u5e93\u6587\u4ef6\u7684\u5143\u6570\u636e\u3002\u8c03\u7528\u00a0<samp>updateRepositoryFile\uff08repositoryId\uff0c repositoryFileId\uff0c file\uff09<\/samp>\u00a0\u4ee5\u66f4\u65b0 \u5b58\u50a8\u5e93\u6587\u4ef6\u5939\u4e2d\u6587\u4ef6\u7684\u5143\u6570\u636e\u3002\u6587\u4ef6\u66f4\u65b0\u540e\uff0c\u6211\u4eec\u663e\u793a\u6587\u4ef6\u7684 ID\uff0c \u540d\u79f0\u3001\u63cf\u8ff0\u3001\u5916\u90e8 URL\u3001\u4e0b\u8f7d \u7f51\u5740\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>final String gDriveRepositoryId = '0XCxx00000000ODGAY', gDriveFolderId = 'folder:0B0lTys1KmM3sSVJ2bjIzTGFqSWs', gDriveFileId = 'document:1q9OatVpcyYBK-JWzp_PhR75ulQghwFP15zhkamKrRcQ';\n\nfinal ConnectApi.ContentHubItemInput updatedItem = new ConnectApi.ContentHubItemInput();\nupdatedItem.itemTypeId = 'document'; \/\/see getAllowedTypes for any file item types available for creation\/update\nupdatedItem.fields = new List&lt;ConnectApi.ContentHubFieldValueInput&gt;();\n\n\/\/Metadata: name field\nfinal ConnectApi.ContentHubFieldValueInput fieldValueInputName = new ConnectApi.ContentHubFieldValueInput();\nfieldValueInputName.name = 'name';\nfieldValueInputName.value =  'updated file name.txt';\nupdatedItem.fields.add(fieldValueInputName);\n\nfinal ConnectApi.RepositoryFileDetail updatedFile = ConnectApi.ContentHub.updateRepositoryFile(gDriveRepositoryId, gDriveFileId, updatedItem);\nSystem.debug(String.format('Updated file - id: \\'\\'{0}\\'\\', name: \\'\\'{1}\\'\\', description: \\'\\'{2}\\'\\',\\n external URL: \\'\\'{3}\\'\\', download URL: \\'\\'{4}\\'\\'',  new String&#91;]{ updatedFile.id, updatedFile.name, updatedFile.description, updatedFile.externalDocumentUrl, updatedFile.downloadUrl}));<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u4f7f\u7528\u5185\u5bb9\u66f4\u65b0\u5b58\u50a8\u5e93\u6587\u4ef6<\/h1>\n\n\n\n<p>\u8c03\u7528\u65b9\u6cd5\u4ee5\u4f7f\u7528\u5185\u5bb9\u66f4\u65b0\u5b58\u50a8\u5e93\u6587\u4ef6\u3002\u8c03\u7528\u00a0<samp>updateRepositoryFile\uff08repositoryId\uff0c repositoryFileId\uff0c file\uff0c fileData\uff09<\/samp>\u00a0\u6765 \u66f4\u65b0\u5b58\u50a8\u5e93\u4e2d\u6587\u4ef6\u7684\u5185\u5bb9\u548c\u5143\u6570\u636e\u3002\u6587\u4ef6\u66f4\u65b0\u540e\uff0c\u6211\u4eec\u663e\u793a \u6587\u4ef6\u7684 ID\u3001\u540d\u79f0\u3001\u63cf\u8ff0\u3001\u5916\u90e8 URL \u548c\u4e0b\u8f7d \u7f51\u5740\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>final String gDriveRepositoryId = '0XCxx00000000ODGAY', gDriveFolderId = 'folder:0B0lTys1KmM3sSVJ2bjIzTGFqSWs', gDriveFileId = 'document:1q9OatVpcyYBK-JWzp_PhR75ulQghwFP15zhkamKrRcQ';\n\nfinal ConnectApi.ContentHubItemInput updatedItem = new ConnectApi.ContentHubItemInput();\nupdatedItem.itemTypeId = 'document'; \/\/see getAllowedTypes for any file item types available for creation\/update\nupdatedItem.fields = new List&lt;ConnectApi.ContentHubFieldValueInput&gt;();\n\n\/\/Metadata: name field\nfinal ConnectApi.ContentHubFieldValueInput fieldValueInputName = new ConnectApi.ContentHubFieldValueInput();\nfieldValueInputName.name = 'name';\nfieldValueInputName.value =  'updated file name.txt';\nupdatedItem.fields.add(fieldValueInputName);\n\n\/\/Binary content\nfinal Blob updatedFileBlob = Blob.valueOf('even more awesome content for updated file');\nfinal String updatedFileMimeType = 'text\/plain';\nfinal ConnectApi.BinaryInput fileBinaryInput = new ConnectApi.BinaryInput(updatedFileBlob, updatedFileMimeType, updatedFileName);\n\nfinal ConnectApi.RepositoryFileDetail updatedFile = ConnectApi.ContentHub.updateRepositoryFile(gDriveRepositoryId, gDriveFileId, updatedItem);\nSystem.debug(String.format('Updated file - id: \\'\\'{0}\\'\\', name: \\'\\'{1}\\'\\', description: \\'\\'{2}\\'\\',\\n external URL: \\'\\'{3}\\'\\', download URL: \\'\\'{4}\\'\\'',  new String&#91;]{ updatedFile.id, updatedFile.name, updatedFile.description, updatedFile.externalDocumentUrl, updatedFile.downloadUrl}));<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u83b7\u53d6\u8eab\u4efd\u9a8c\u8bc1 URL<\/h1>\n\n\n\n<p>\u8c03\u7528\u65b9\u6cd5\u4ee5\u83b7\u53d6\u8eab\u4efd\u9a8c\u8bc1 URL\u3002\u8c03\u7528\u00a0<samp>getOAuthCredentialAuthUrl\uff08requestBody\uff09<\/samp>\u00a0\u4ee5\u68c0\u7d22\u7528\u6237 \u5fc5\u987b\u8bbf\u95ee\u624d\u80fd\u5f00\u59cb\u8eab\u4efd\u9a8c\u8bc1\u6d41\u7a0b\uff0c\u6700\u7ec8\u5c06\u8eab\u4efd\u9a8c\u8bc1\u4ee4\u724c\u8fd4\u56de\u5230 Salesforce\u7684\u3002\u63a5\u53d7\u8868\u793a\u7279\u5b9a\u5916\u90e8\u51ed\u636e\u7684\u8f93\u5165\u53c2\u6570\uff0c\u5e76\u4e14 \uff08\u53ef\u9009\uff09\u547d\u540d\u4e3b\u4f53\u3002\u4f7f\u7528\u6b64\u65b9\u6cd5\u4f5c\u4e3a\u6784\u5efa\u81ea\u5b9a\u4e49\u6216\u54c1\u724c\u7684\u4e00\u90e8\u5206 \u7528\u6237\u754c\u9762\uff0c\u5e2e\u52a9\u7528\u6237\u542f\u52a8\u8eab\u4efd\u9a8c\u8bc1\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ConnectApi.OAuthCredentialAuthUrlInput input = new ConnectApi.OAuthCredentialAuthUrlInput();\n\ninput.externalCredential = 'MyExternalCredentialDeveloperName';\ninput.principalType = ConnectApi.CredentialPrincipalType.PerUserPrincipal;\ninput.principalName = 'MyPrincipal'; \/\/ Only required when principalType = NamedPrincipal\n\nConnectApi.OAuthCredentialAuthUrl output = ConnectApi.NamedCredentials.getOAuthCredentialAuthUrl(input);\n\nString authenticationUrl = output.authenticationUrl; \/\/ Redirect users to this URL to authenticate in the browser<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u5728 Apex \u4e2d\u4f7f\u7528 Connect \u5f00\u53d1\u81ea\u5b9a\u4e49\u4f53\u9a8c Salesforce\u7684\u3002Connect in Apex \u63d0\u4f9b\u5bf9 B2B Commerce \u7684\u7f16\u7a0b\u8bbf\u95ee\uff0c CMS \u6258\u7ba1\u5185\u5bb9\u3001Experience Cloud \u7ad9\u70b9\u3001\u4e3b\u9898\u7b49\u3002\u521b\u5efa Apex \u663e\u793a Chatter \u6458\u8981\u7684\u9875\u9762\uff0c\u53d1\u5e03\u5e26\u6709\u63d0\u53ca\u548c\u4e3b\u9898\u7684\u6458\u8981\u9879\u76ee\uff0c \u5e76\u66f4\u65b0\u7528\u6237\u548c\u7fa4\u7ec4\u7167\u7247\u3002\u521b\u5efa\u66f4\u65b0 Chatter \u7684\u89e6\u53d1\u5668 Feed\u3002<\/p>\n","protected":false},"author":1,"featured_media":3706,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[199],"tags":[210],"class_list":["post-3705","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-apex-","tag-apex-connect"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u5728 Apex \u4e2d\u8fde\u63a5 - \u767d\u767d\u968f\u7b14<\/title>\n<meta name=\"description\" content=\"\u5728 Apex \u4e2d\u4f7f\u7528 Connect \u5f00\u53d1\u81ea\u5b9a\u4e49\u4f53\u9a8c Salesforce\u7684\u3002Connect in Apex \u63d0\u4f9b\u5bf9 B2B Commerce \u7684\u7f16\u7a0b\u8bbf\u95ee\uff0c CMS \u6258\u7ba1\u5185\u5bb9\u3001Experience Cloud \u7ad9\u70b9\u3001\u4e3b\u9898\u7b49\u3002\u521b\u5efa Apex \u663e\u793a Chatter \u6458\u8981\u7684\u9875\u9762\uff0c\u53d1\u5e03\u5e26\u6709\u63d0\u53ca\u548c\u4e3b\u9898\u7684\u6458\u8981\u9879\u76ee\uff0c \u5e76\u66f4\u65b0\u7528\u6237\u548c\u7fa4\u7ec4\u7167\u7247\u3002\u521b\u5efa\u66f4\u65b0 Chatter \u7684\u89e6\u53d1\u5668 Feed\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/www.ponybai.com\/?p=3705\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5728 Apex \u4e2d\u8fde\u63a5 - \u767d\u767d\u968f\u7b14\" \/>\n<meta property=\"og:description\" content=\"\u5728 Apex \u4e2d\u4f7f\u7528 Connect \u5f00\u53d1\u81ea\u5b9a\u4e49\u4f53\u9a8c Salesforce\u7684\u3002Connect in Apex \u63d0\u4f9b\u5bf9 B2B Commerce \u7684\u7f16\u7a0b\u8bbf\u95ee\uff0c CMS \u6258\u7ba1\u5185\u5bb9\u3001Experience Cloud \u7ad9\u70b9\u3001\u4e3b\u9898\u7b49\u3002\u521b\u5efa Apex \u663e\u793a Chatter \u6458\u8981\u7684\u9875\u9762\uff0c\u53d1\u5e03\u5e26\u6709\u63d0\u53ca\u548c\u4e3b\u9898\u7684\u6458\u8981\u9879\u76ee\uff0c \u5e76\u66f4\u65b0\u7528\u6237\u548c\u7fa4\u7ec4\u7167\u7247\u3002\u521b\u5efa\u66f4\u65b0 Chatter \u7684\u89e6\u53d1\u5668 Feed\u3002\" \/>\n<meta property=\"og:url\" content=\"http:\/\/www.ponybai.com\/?p=3705\" \/>\n<meta property=\"og:site_name\" content=\"\u767d\u767d\u968f\u7b14\" \/>\n<meta property=\"article:published_time\" content=\"2023-12-10T03:03:29+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-11-25T08:16:16+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.ponybai.com\/wp-content\/uploads\/2023\/11\/connect.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1057\" \/>\n\t<meta property=\"og:image:height\" content=\"193\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"ponybai\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"ponybai\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"http:\/\/www.ponybai.com\/?p=3705#article\",\"isPartOf\":{\"@id\":\"http:\/\/www.ponybai.com\/?p=3705\"},\"author\":{\"name\":\"ponybai\",\"@id\":\"http:\/\/www.ponybai.com\/#\/schema\/person\/935c7592c850c65e1e5eba4530dbf883\"},\"headline\":\"\u5728 Apex \u4e2d\u8fde\u63a5\",\"datePublished\":\"2023-12-10T03:03:29+00:00\",\"dateModified\":\"2023-11-25T08:16:16+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\/\/www.ponybai.com\/?p=3705\"},\"wordCount\":472,\"publisher\":{\"@id\":\"http:\/\/www.ponybai.com\/#\/schema\/person\/935c7592c850c65e1e5eba4530dbf883\"},\"keywords\":[\"Apex Connect\"],\"articleSection\":[\"Apex \u5f00\u53d1\u4eba\u5458\u6307\u5357\"],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"WebPage\",\"@id\":\"http:\/\/www.ponybai.com\/?p=3705\",\"url\":\"http:\/\/www.ponybai.com\/?p=3705\",\"name\":\"\u5728 Apex \u4e2d\u8fde\u63a5 - \u767d\u767d\u968f\u7b14\",\"isPartOf\":{\"@id\":\"http:\/\/www.ponybai.com\/#website\"},\"datePublished\":\"2023-12-10T03:03:29+00:00\",\"dateModified\":\"2023-11-25T08:16:16+00:00\",\"description\":\"\u5728 Apex \u4e2d\u4f7f\u7528 Connect \u5f00\u53d1\u81ea\u5b9a\u4e49\u4f53\u9a8c Salesforce\u7684\u3002Connect in Apex \u63d0\u4f9b\u5bf9 B2B Commerce \u7684\u7f16\u7a0b\u8bbf\u95ee\uff0c CMS \u6258\u7ba1\u5185\u5bb9\u3001Experience Cloud \u7ad9\u70b9\u3001\u4e3b\u9898\u7b49\u3002\u521b\u5efa Apex \u663e\u793a Chatter \u6458\u8981\u7684\u9875\u9762\uff0c\u53d1\u5e03\u5e26\u6709\u63d0\u53ca\u548c\u4e3b\u9898\u7684\u6458\u8981\u9879\u76ee\uff0c \u5e76\u66f4\u65b0\u7528\u6237\u548c\u7fa4\u7ec4\u7167\u7247\u3002\u521b\u5efa\u66f4\u65b0 Chatter \u7684\u89e6\u53d1\u5668 Feed\u3002\",\"breadcrumb\":{\"@id\":\"http:\/\/www.ponybai.com\/?p=3705#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/www.ponybai.com\/?p=3705\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/www.ponybai.com\/?p=3705#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"http:\/\/www.ponybai.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5728 Apex \u4e2d\u8fde\u63a5\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/www.ponybai.com\/#website\",\"url\":\"http:\/\/www.ponybai.com\/\",\"name\":\"\u767d\u767d\u968f\u7b14\",\"description\":\"Salesforce\u5b98\u65b9\u8bb2\u5e08\",\"publisher\":{\"@id\":\"http:\/\/www.ponybai.com\/#\/schema\/person\/935c7592c850c65e1e5eba4530dbf883\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/www.ponybai.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"http:\/\/www.ponybai.com\/#\/schema\/person\/935c7592c850c65e1e5eba4530dbf883\",\"name\":\"ponybai\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"http:\/\/www.ponybai.com\/#\/schema\/person\/image\/\",\"url\":\"http:\/\/www.ponybai.com\/wp-content\/uploads\/2025\/03\/cropped-Ihsans-WeChatQR.jpg\",\"contentUrl\":\"http:\/\/www.ponybai.com\/wp-content\/uploads\/2025\/03\/cropped-Ihsans-WeChatQR.jpg\",\"width\":248,\"height\":248,\"caption\":\"ponybai\"},\"logo\":{\"@id\":\"http:\/\/www.ponybai.com\/#\/schema\/person\/image\/\"},\"sameAs\":[\"http:\/\/121.37.188.161\"],\"url\":\"http:\/\/www.ponybai.com\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u5728 Apex \u4e2d\u8fde\u63a5 - \u767d\u767d\u968f\u7b14","description":"\u5728 Apex \u4e2d\u4f7f\u7528 Connect \u5f00\u53d1\u81ea\u5b9a\u4e49\u4f53\u9a8c Salesforce\u7684\u3002Connect in Apex \u63d0\u4f9b\u5bf9 B2B Commerce \u7684\u7f16\u7a0b\u8bbf\u95ee\uff0c CMS \u6258\u7ba1\u5185\u5bb9\u3001Experience Cloud \u7ad9\u70b9\u3001\u4e3b\u9898\u7b49\u3002\u521b\u5efa Apex \u663e\u793a Chatter \u6458\u8981\u7684\u9875\u9762\uff0c\u53d1\u5e03\u5e26\u6709\u63d0\u53ca\u548c\u4e3b\u9898\u7684\u6458\u8981\u9879\u76ee\uff0c \u5e76\u66f4\u65b0\u7528\u6237\u548c\u7fa4\u7ec4\u7167\u7247\u3002\u521b\u5efa\u66f4\u65b0 Chatter \u7684\u89e6\u53d1\u5668 Feed\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/www.ponybai.com\/?p=3705","og_locale":"zh_CN","og_type":"article","og_title":"\u5728 Apex \u4e2d\u8fde\u63a5 - \u767d\u767d\u968f\u7b14","og_description":"\u5728 Apex \u4e2d\u4f7f\u7528 Connect \u5f00\u53d1\u81ea\u5b9a\u4e49\u4f53\u9a8c Salesforce\u7684\u3002Connect in Apex \u63d0\u4f9b\u5bf9 B2B Commerce \u7684\u7f16\u7a0b\u8bbf\u95ee\uff0c CMS \u6258\u7ba1\u5185\u5bb9\u3001Experience Cloud \u7ad9\u70b9\u3001\u4e3b\u9898\u7b49\u3002\u521b\u5efa Apex \u663e\u793a Chatter \u6458\u8981\u7684\u9875\u9762\uff0c\u53d1\u5e03\u5e26\u6709\u63d0\u53ca\u548c\u4e3b\u9898\u7684\u6458\u8981\u9879\u76ee\uff0c \u5e76\u66f4\u65b0\u7528\u6237\u548c\u7fa4\u7ec4\u7167\u7247\u3002\u521b\u5efa\u66f4\u65b0 Chatter \u7684\u89e6\u53d1\u5668 Feed\u3002","og_url":"http:\/\/www.ponybai.com\/?p=3705","og_site_name":"\u767d\u767d\u968f\u7b14","article_published_time":"2023-12-10T03:03:29+00:00","article_modified_time":"2023-11-25T08:16:16+00:00","og_image":[{"width":1057,"height":193,"url":"http:\/\/www.ponybai.com\/wp-content\/uploads\/2023\/11\/connect.png","type":"image\/png"}],"author":"ponybai","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"ponybai","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"6 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"http:\/\/www.ponybai.com\/?p=3705#article","isPartOf":{"@id":"http:\/\/www.ponybai.com\/?p=3705"},"author":{"name":"ponybai","@id":"http:\/\/www.ponybai.com\/#\/schema\/person\/935c7592c850c65e1e5eba4530dbf883"},"headline":"\u5728 Apex \u4e2d\u8fde\u63a5","datePublished":"2023-12-10T03:03:29+00:00","dateModified":"2023-11-25T08:16:16+00:00","mainEntityOfPage":{"@id":"http:\/\/www.ponybai.com\/?p=3705"},"wordCount":472,"publisher":{"@id":"http:\/\/www.ponybai.com\/#\/schema\/person\/935c7592c850c65e1e5eba4530dbf883"},"keywords":["Apex Connect"],"articleSection":["Apex \u5f00\u53d1\u4eba\u5458\u6307\u5357"],"inLanguage":"zh-Hans"},{"@type":"WebPage","@id":"http:\/\/www.ponybai.com\/?p=3705","url":"http:\/\/www.ponybai.com\/?p=3705","name":"\u5728 Apex \u4e2d\u8fde\u63a5 - \u767d\u767d\u968f\u7b14","isPartOf":{"@id":"http:\/\/www.ponybai.com\/#website"},"datePublished":"2023-12-10T03:03:29+00:00","dateModified":"2023-11-25T08:16:16+00:00","description":"\u5728 Apex \u4e2d\u4f7f\u7528 Connect \u5f00\u53d1\u81ea\u5b9a\u4e49\u4f53\u9a8c Salesforce\u7684\u3002Connect in Apex \u63d0\u4f9b\u5bf9 B2B Commerce \u7684\u7f16\u7a0b\u8bbf\u95ee\uff0c CMS \u6258\u7ba1\u5185\u5bb9\u3001Experience Cloud \u7ad9\u70b9\u3001\u4e3b\u9898\u7b49\u3002\u521b\u5efa Apex \u663e\u793a Chatter \u6458\u8981\u7684\u9875\u9762\uff0c\u53d1\u5e03\u5e26\u6709\u63d0\u53ca\u548c\u4e3b\u9898\u7684\u6458\u8981\u9879\u76ee\uff0c \u5e76\u66f4\u65b0\u7528\u6237\u548c\u7fa4\u7ec4\u7167\u7247\u3002\u521b\u5efa\u66f4\u65b0 Chatter \u7684\u89e6\u53d1\u5668 Feed\u3002","breadcrumb":{"@id":"http:\/\/www.ponybai.com\/?p=3705#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["http:\/\/www.ponybai.com\/?p=3705"]}]},{"@type":"BreadcrumbList","@id":"http:\/\/www.ponybai.com\/?p=3705#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"http:\/\/www.ponybai.com\/"},{"@type":"ListItem","position":2,"name":"\u5728 Apex \u4e2d\u8fde\u63a5"}]},{"@type":"WebSite","@id":"http:\/\/www.ponybai.com\/#website","url":"http:\/\/www.ponybai.com\/","name":"\u767d\u767d\u968f\u7b14","description":"Salesforce\u5b98\u65b9\u8bb2\u5e08","publisher":{"@id":"http:\/\/www.ponybai.com\/#\/schema\/person\/935c7592c850c65e1e5eba4530dbf883"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/www.ponybai.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":["Person","Organization"],"@id":"http:\/\/www.ponybai.com\/#\/schema\/person\/935c7592c850c65e1e5eba4530dbf883","name":"ponybai","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"http:\/\/www.ponybai.com\/#\/schema\/person\/image\/","url":"http:\/\/www.ponybai.com\/wp-content\/uploads\/2025\/03\/cropped-Ihsans-WeChatQR.jpg","contentUrl":"http:\/\/www.ponybai.com\/wp-content\/uploads\/2025\/03\/cropped-Ihsans-WeChatQR.jpg","width":248,"height":248,"caption":"ponybai"},"logo":{"@id":"http:\/\/www.ponybai.com\/#\/schema\/person\/image\/"},"sameAs":["http:\/\/121.37.188.161"],"url":"http:\/\/www.ponybai.com\/?author=1"}]}},"_links":{"self":[{"href":"http:\/\/www.ponybai.com\/index.php?rest_route=\/wp\/v2\/posts\/3705","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.ponybai.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.ponybai.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.ponybai.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.ponybai.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3705"}],"version-history":[{"count":2,"href":"http:\/\/www.ponybai.com\/index.php?rest_route=\/wp\/v2\/posts\/3705\/revisions"}],"predecessor-version":[{"id":3712,"href":"http:\/\/www.ponybai.com\/index.php?rest_route=\/wp\/v2\/posts\/3705\/revisions\/3712"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.ponybai.com\/index.php?rest_route=\/wp\/v2\/media\/3706"}],"wp:attachment":[{"href":"http:\/\/www.ponybai.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3705"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.ponybai.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3705"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.ponybai.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3705"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}