How can I publish to facebook graph api with cfhttp?
How can I publish to Facebook Graph API with Coldfusion?
The following works fine until my cfhttp post.
I want to post with cfhttp to wall/timeline of a user.
<!--- This is the page that you call and also use as the redirect_uri... facebook returns code and state in the URL ---> <cfparam name="URL.code" default="" type="string"> <cfparam name="URL.state" default="" type="string"> <cfif #URL.code# EQ ""> <cfparam name="URL.error_reason" default="" type="string"> <cfparam name="URL.error" default="" type="string"> <cfparam name="URL.error_description" default="" type="string"> <cfmail charset="utf-8" type="html" server="mail.mysite.com" from="[email protected]" to="[email protected]" subject="Facebook Authentication Denial"> #SESSION.my_profile_id#: #SESSION.my_profile_username# #URL.error_reason#<br/> #URL.error#<br/> #URL.error_description#<br/> </cfmail> <cfabort> <cfelse> <cfhttp method="get" url="https://graph.facebook.com/oauth/access_token?client_id=myappid&redirect_uri=http://www.mysite.com/dbf/_my-controller/fb_user_code.cfm&client_secret=216792f1a1ddbb568c57624a988028dc&code=#Trim(URL.code)#" result="my_fb_user_token"/> <cfif #my_fb_user_token.filecontent# CONTAINS "access_token="> <cfset new_token = ReplaceNoCase(#my_fb_user_token.filecontent#,"&expires","|","all")> <cfset new_token = REReplaceNoCase(#new_token#,"\|.*$","")> <cfquery name="fb_confusion" datasource="#dsn#" maxrows="1"> SELECT facebook_id FROM my_profile WHERE my_profile_id = '#SESSION.my_profile_id#' </cfquery> <cfoutput>#new_token#</cfoutput> <hr/> <cfhttp method="get" url="https://graph.facebook.com/me?#new_token#" result="my_fb_user"/> <cfoutput>https://graph.facebook.com/#fb_confusion.facebook_id#/feed?#new_token#</cfoutput> <hr/> <cfoutput> <cfhttp url="https://graph.facebook.com/me/mysite:add?group=http://www.mysite.com/dbf/test_group.cfm&#new_token#" result="fb_publish" method="post" multipart="yes"> <cfhttpparam name="appID" value="myappid" encoded="no" type="url"> <cfhttpparam name="access_token" value="#my_fb_user_token.filecontent#" encoded="no" type="url"> <cfhttpparam name="message" value="Test" encoded="no" type="url"> <cfhttpparam name="link" value="http://www.mysite.com" encoded="no" type="url"> <cfhttpparam name="name" value="Test" encoded="no" type="url"> <cfhttpparam name="caption" value="Testing fb api" encoded="no" type="url"> <cfhttpparam name="description" value="Testing to see if this posts" encoded="no" type="url"> </cfhttp> </cfoutput> <cfdump var="#fb_publish.filecontent#"> </cfif> </cfif>
The message returned by the discharge of fb_publish is:
{"error": {"message": 'Invalid OAuth access token.', 'type': 'OAuthException', 'code': 190}}
OK thanks Ray C to help with this. Things couple... first of all, called by the http post URL must synchronize with that facebook requires.
Then, all the type = "url" in the cfhttp form settings had to be changed to formfield.
Now it's working.
Thank you!
Tags: ColdFusion
Similar Questions
-
How can I publish from lightroom 5,7 to Facebook? [A: Facebook]
How can I publish from lightroom 5,7 to Facebook? Nothing seems to happen, and my clients want to see photos on Facebook.
Hi brentg,.
See these tutorials to publish images from Lightroom to facebook:
How do I post photos from Photoshop Lightroom for social media
Lightroom Tutorial 5: publication of photos from Lightroom to Facebook | Lynda.com - YouTube
Concerning
Claes
-
How can I publish a PDF on Facebook or social media sites?
How can I publish a PDF file for social media?
Given that each social media site has its own mechanisms to display the files, I suggest you only watch on each of them for instructions.
-
Facebook Graph API HTTP connector
Hi, has anyone tried using the HTTP connector to read the data of the Facebook graph API? I have provided credentials in the 'OAuth Consumer key' and the 'Secret OAuth Consumer"but I get the following error message {'error': {'message':" wait 1 '.' in the hallway between the postcard and the load useful ',' type': 'OAuthException', 'code': 1 "}}10022162,
Facebook authorization uses OAuth 2.0 to access their APIs. This can be accomplished via Integrator but requires little java code to manage the transaction. We hope to have native support for this in a future release.
Ryan S - EID PM
-
How can I download the Facebook app without having to pay for it?
How can I download the Facebook app without having to pay for it?
Please explain? The place where you try the download?
-
I was out of town and my system froze. When I got home, I had to turn off and restart. System entered the disk sector recovery and repair bad sectors. Then when the computer reboots, the system shows error '7 Windows Build not genuine 7600. After reviewing the forum, I have DL'd Diag MGA tool and results create a CAB file. How can I publish the results here?
When I check the properties of the computer, to the title of the Windows Activation, there "Status unavailable", "product ID: not available.
In order to receive the best support, download and run the tool diagnoses of Genuine (MGADiag.exe) at http://go.microsoft.com/fwlink/?linkid=52012link. Click on 'Continue', and then, after a few seconds, click on the button 'copy '. Then, create a response message in this thread and paste the report in.
-
How can I publish it directly to the CC in Lightroom ViewBug?
How can I publish it directly to the CC in Lightroom ViewBug?
This weekend is going to be a new ViewBug plugin for lightroom and you will be able to publish directly.
-
Hi, I la DPS Unique The edition is but le Producer of Folio public when le Folio J’ai only has been deprived. Why? How can I publish for the public? Thank you
You should look at our guide edition single edition. You do not use producer Folio with simple editing. http://help.Adobe.com/en_US/ppcompdoc/Step_by_step_guide_to_dps_se.PDF
Note that support for simple editing in creative cloud ends may 1. Make sure you get your app completed and approved by Apple before this date.
Neil
-
I designed my social media buttons. How can I add the link to each of them. For example: How can I add my Facebook link to my facebook on my site of muse button?
Hello
Please select the button that you created and go to the hyperlink tab, and add the URL of the facebook page here.
Please take a look at the screenshot below.
Concerning
Vivek
-
you want to create a new look for our website using Muse and move the hosting of GoDaddy for Business Catalyst. How can I publish my new Muse on exsiting URL design and change hosting? @@
Hi love,
You can publish your Business Catalyst, simply open your file of muse and select files-> publish.
Please refer to this tutorial:- publish your site with Adobe Web Hosting | Learn the Muse | Adobe TV
In addition, once your site is published, you can add your domain to your site hosted on BusinessCatalyst.
Please refer to this tutorial to add your domain name:- http://helpx.adobe.com/business-catalyst/using/change-site-domain.html
Hope this helps
Kind regards
Rohit Nair
-
How can I publish with android if I have only a creative cloud membership?
How can I publish to android or is it not possible composition of the creative cloud?
It is not possible to use a simple editing application to create applications Android DPS. You need a professional plan or company to DPS.
-
How can I publish a Flash ani without the right scroll bar?
My customer wants to its pages without the right scroll bar. I know it's a little crazy on his part, but it's what he wants. How can I publish ani Flash so that there is no vertical scroll bar on the right side? Here is the example he uses...
Thank you!
This link has a scroll bar vertical ie. FF displays a scroll bar, unless it is necessary.
Add
style = "overflow: auto".
the body of your html page tag
-
How can I export 2.7 video k with 13 elements?
How can I export 2.7 video k with 13 elements?
Sergio A Almeida
What is the resolution of your video 2.7 K (2704 x 1524?) and what you want in the way of export
Size of the image
Frame rate
Video compression
Audio compression
File extension
I can give you how specific with what precedes.
Otherwise, I'll tell you that you will do a selection Publish + share/computer with preset and then customize the preset
under the button/video Audio preset and advanced tabs. But here's what publication + share/computer/AVCHD with preset MP4
H.264 1920 x 1080 p 30 custom 2704 x 1524 @ 29.97 progressive frames per second in the advanced key/video label.
We will follow for details to help us.
Thank you.
RTA
-
How can I get Office 365 to sinc with my ipad and Iphone?
How can I get Office 365 to sinc with my ipad and Iphone?
Synchronize what, exactly?
-
How can I write a letter in french with Pages
I use my computer in English, and I have to write an essay in french
So, how can I write a letter in french with Pages
Hi Luke,.
If you are familiar with the French keyboard layout, you can move from the keyboard to this provision.
If not, you can acess of the accents you will need the English KB layouts using (for example) option-~, then press e to e, or -e option, then press e to e. see the viewer keyboard for other options. Open the keyboard Viewer, and then press option key to display the keys to use for each accent.
If all the accents you need are not available from an English keyboard, you can still list a French KB language as a 'second choice' and switch to it when you need an accented letter.
Choice of the keyboard are defined in system preferences > language and text > input sources. If you choose more KB a page layout, the entry menu (a flag) will appear in your menu bar. The indicator shows the currently active KB.
Kind regards
Barry
Maybe you are looking for
-
How can I mix and match different amps and cabinets?
I'm running Logic Pro and still have a problem with the amp Designer. I read in the world how it is easy to mix and match different amps, cabs and pickups but the drop down menus where I should be able to select them all are disabled. I can browse al
-
How to save the data of different rates in a single VI?
Hello I tried to acquire 2-channel measurement of voltage at 10 kHz and analyze data, finally to save the data to both 1 kHz and 1 Hz. What I did is this loop of producer/consumer use to do the work of recording at different rates. I have queued all
-
Cannot use scandisk. literally, old no knowledge.
It means. bought the scandisk, stuck in it and can not find the right code to move the data. Help!
-
Repeated 'Ink system failure' error 0xc19a0035
I have a HPc7250 printer all in one Windows 7 0xc19a0035 error message Get this error several times... This means that my printer is "over the hill"?
-
Can someone help me or give me a sample of a sqlite, phonegap jquerymobile listview?
HelloI know I asked a lot and it may seem greedy, but I really need help. I search for days tried almost everything, build video codes from scratch, and and even brought models. I downloaded the github files and nothing seems to work. If anyone can h