使用MonkehTweet通过Coldfusion向Twitter发布多幅图像
我正在使用MonkehTweet Coldfusion包装器进行Twitter身份验证。我已经准备好了一切,但是我不能用positionpdatewithmedia功能来发布多张图片。我对coldfusion比较陌生,并且一路学习。一个简单的调用PostUpdateWithMedia(status=“”,media=“”)会在Twitter上发布一张图片,但我如何使用它发布多张图片呢。MonkehTweet的positionUpdateWithMedia函数是使用MonkehTweet通过Coldfusion向Twitter发布多幅图像,twitter,coldfusion,cfc,Twitter,Coldfusion,Cfc,我正在使用MonkehTweet Coldfusion包装器进行Twitter身份验证。我已经准备好了一切,但是我不能用positionpdatewithmedia功能来发布多张图片。我对coldfusion比较陌生,并且一路学习。一个简单的调用PostUpdateWithMedia(status=“”,media=“”)会在Twitter上发布一张图片,但我如何使用它发布多张图片呢。MonkehTweet的positionUpdateWithMedia函数是 <cffunctio
<cffunction name="postUpdateWithMedia" access="public" output="false" hint="Updates the authenticating user's status. Request must be a POST. A status update with text identical to the authenticating user's current status will be ignored to prevent duplicates.">
<cfargument name="status" required="true" type="String" hint="The text of your status update. URL encode as necessary. Statuses over 140 characters will be forceably truncated." />
<cfargument name="media" required="true" type="string" hint="Up to max_media_per_upload files may be specified in the request, each named media[]. Supported image formats are PNG, JPG and GIF. Animated GIFs are not supported." />
<cfargument name="possibly_sensitive" required="false" type="boolean" default="false" hint="Set to true for content which may not be suitable for every audience." />
<cfargument name="in_reply_to_status_id" required="false" type="String" hint="The ID of an existing status that the update is in reply to." />
<cfargument name="lat" required="false" type="String" hint="The location's latitude that this tweet refers to." />
<cfargument name="long" required="false" type="String" hint="The location's longitude that this tweet refers to." />
<cfargument name="place_id" required="false" type="String" hint="A place in the world. These IDs can be retrieved from geo/reverse_geocode." />
<cfargument name="display_coordinates" required="false" type="String" hint="Whether or not to put a pin on the exact coordinates a tweet has been sent from." />
<cfargument name="checkHeader" required="false" type="boolean" default="false" hint="If set to true, I will abort the request and return the response headers for debugging." />
<cfargument name="timeout" required="false" type="string" default="#variables.instance.timeout#" hint="An optional timeout value, in seconds, that is the maximum time the cfhttp requests can take. If the time-out passes without a response, ColdFusion considers the request to have failed." />
<cfset var strTwitterMethod = '' />
<cfset arguments["media[]"] = arguments.media />
<cfset structDelete(arguments,'media') />
<cfset strTwitterMethod = getCorrectEndpoint('api') & 'statuses/update_with_media.json' />
<cfreturn genericAuthenticationMethod(timeout=getTimeout(), httpURL=strTwitterMethod,httpMethod='POST', parameters=arguments, checkHeader=arguments.checkHeader) />
</cffunction>
我已尝试将多个文件作为,
PositUpdateWithMedia(状态=”,媒体=”,媒体=”);但它不起作用。但是,我把多重媒体的观点传错了。有人能帮我传递多媒体参数吗。不幸的是,MonkehTweet不支持,这是多图像推文所必需的-它只支持不推荐的
状态/update\u with\u media
,它仍然有效,但只支持单个图像。我还注意到,代码仍然引用140个字符的tweet,因此它可能已经有一段时间没有更新了。我也不知道该API还有其他的ColdFusion包装器,所以这是您需要自己构建的东西