Advertisement
MarcelVanLangen

Problems posting to Facebook

Jul 1st, 2014
301
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <cfset session.fbAPI = createObject("component","facebook").init(session.fbaccesstoken)>
  2. <cfset variables.userID = StructFind(session.fbAPI.getMe(),'id') />
  3. <cfset variables.facebookPostURL = "https://graph.facebook.com/#variables.userID#/feed" />         
  4. <cfhttp method="post" url="#variables.facebookPostURL#">
  5.     <cfhttpparam type="URL" value="#attributes.vra_vraag#" name="message">
  6.     <cfhttpparam type="URL" value="#session.fbaccesstoken#" name="access_token">
  7. </cfhttp>
  8. <cfhttp url="https://graph.facebook.com/me/feed" method="post">
  9.     <cfhttpparam name="access_token" value="#session.fbaccesstoken#" type="formfield">
  10.     <cfhttpparam name="message" value="A short message" type="formfield">
  11.     <cfhttpparam name="link" value="" type="formfield">
  12.     <cfhttpparam name="name" value="Your name" type="formfield">
  13.     <cfhttpparam name="caption" value="caption" type="formfield">
  14.     <cfhttpparam name="description" value="#attributes.vra_vraag#" type="formfield">
  15.     <cfhttpparam name="picture" value="" type="formfield">
  16. </cfhttp>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement