FBConnect Issues: Authentication and post won't work the first time - iphone

I've two issues with Facebook Connect:
1) I use the new Single Sign On Authentication. It works great, but the first time, I authenticate an user with my App when I request the token, i immediately want to post a link to the users wall, but then I get this error:
2011-10-11 15:42:44.831 [1717:707] Dialog DidFail With Error: Error Domain=NSURLErrorDomain Code=-999 "The operation couldn’t be completed. (NSURLErrorDomain error -999.)" UserInfo=0x7487290 {NSErrorFailingURLKey=https://m.facebook.com/dialog/feed?link=http%3A%2F%2Fwww.example.it%2Findex.php%3Fid%3D4%26no_cache%3D1%26tx_ttnews%5Btt_news%5D%3D103184&access_token=_test-Z0Ru37mpEAbffAn9n5wlWUaIVOH2tsF8.eyJpdiI6IjYyUXVBOTJKZVVwWjF5bmxZUmluUGcifQ.VxaUq2QcPXUgcYTjvqtnhLcBK27wflAIv3XoNVNcRT6dtQqfJZZ9NdLqLXxPdpBFl1U1DGF8xetLy8TOcLuLmU9l2AQ0JzYKmm9d-7azAYCYiZc51BiXKgHlpzw9Hsplr-tTKAfkXF2oJSOkbeN7UDMyLqDdCyhwiFTdVX3tGzA&app_id=1535027294&redirect_uri=fbconnect%3A%2F%2Fsuccess&user_message_prompt=Teilen&sdk=2&display=touch, NSErrorFailingURLStringKey=https://m.facebook.com/dialog/feed?link=http%3A%2F%2Fwww.example.it%2Findex.php%3Fid%3D4%26no_cache%3D1%26tx_ttnews%5Btt_news%5D%3D103184&access_token=_Wtest_modifiedF8.eyJpdiI6IjYyUXVBOTJKZVVwWjF5bmxZUmluUGcifQ.VxaUq2QcPXUgcYTjvqtnhLcBK27wflAIv3XoNVNcRT6dtQqfJZZ9NdLqLXxPdpBFl1U1DGF8xetLy8TOcLuLmU9l2AQ0JzYKmm9d-7azAYCYiZc51BiXKgHlpzw9Hsplr-tTKAfkXF2oJSOkbeN7UDMyLqDdCyhwiFTdVX3tGzA&app_id=688535027294&redirect_uri=fbconnect%3A%2F%2Fsuccess&user_message_prompt=Teilen&sdk=2&display=touch}
The second time I try to post something to the wall I get a success, there I don't need to request the permissions again. But the first time it always fauls. With the facebook.app installed, but also with the redirect from Safari.

I only requested "stream_publish", when requesting also "offline_access" then it works. Seems to be a Facebook issue.

We are seeing the same thing over on First dialog after authenticating fails immediately and closes dialog
I know yours was first, but the discussion ended up over on that question.

Related

post to pages not works after turns app public

i wrote a very simple function that send some text to a fb app that just post the sended text as post as page where im the admin too.
im using a plugin for laravel that use the longterm fb token as authorization for publish.
unitll now everything works nice, but the post was visible just to me due the developing mode on the app. Today I turn it as pubblic, but i dont works anymore! thats is the error message raised by my plugin:
Exception {#323 ▼
#message: "Graph returned an error: (#200) Requires either publish_to_groups permission and app being installed in the group, or manage_pages and publish_pages as an admin ▶"
#code: 0
#file: "/home/natty/workspace/speechToTextStories/vendor/toolkito/larasap/src/Facebook/Api.php"
#line: 69
trace: {▶}
}
i didnt change anything on my code, and the "long term token" is still good as fb's debugger says. Maybe I touch something on the settings page of the app, but after i try to put again as before...but no results still erros.
On settings i got:
publish_pages
publish_to_groups
manage_pages

Getting OAuth error type when posting opengraph or wallpost

We have a sandbox app for development, but since this morning, our sandbox app are unable to post any wallpost or opengraph to feeds page or timeline. We are getting an error message like this for posting wallpost
Object {error: Object}
error: Object
code: 368
message: "Warning: This Message Contains Blocked Content: Some content in this message has been reported as abusive by Facebook users."
type: "OAuthException"
__proto__: Object
__proto__: Object
And we are getting error for posting opengraph
"An unexpected error has occurred. Please retry your request later."
The path we use to load the object is eg. fb-api.ourdomain.com/fbapi/{ourappname}/opengraph/{action_object}/gift_id/{gift_id}, and we put this domain name to the debugger at https://developers.facebook.com/tools/debug/, we got an error message
Error Parsing URL: Error parsing input URL, no data was scraped.
but once we changed to fb-test.ourdomain.com/fbapi/{ourappname}/opengraph/{action_object}/gift_id/{gift_id}
the debugger can return the object information.
So our question is, are we not allowed to use fb related name as our sub-domain name (but we cannot see that in the platform policy page: https://developers.facebook.com/policy/)? Or our sandbox app and object link got blocked because we created too many testing wallpost?
If it is the later case, why we cannot use the same object URL in other app? It looks like the object URL got blocked.
Thanks!

Having trouble getting facebook sample to work - the one called "Feed Dialog".

Does anyone have a working xcode project they could upload / share?
I'm having trouble getting this to work clean without errors.
The example is located here.
[https://developers.facebook.com/docs/howtos/feed-dialog-using-ios-sdk/][1]
I have the project working to this extent -
The main viewcontroller is displayed with a button that allows the user to send a post to facebook.
When clicked, facebook indicates that the user has already authorized the app to post to their page. He clicks OK on the facebook message and then the user sees the 'share' dialog and is allowed to enter text for his post.
As the sharedialog is presented to the user, I get this warning in my console
2012-09-29 11:04:25.190 gw_fakeapp[8016:fe03] FBConditionalLog: handleOpenURL should not be called once a session has closed
My problem comes when the user clicks "share", I get the error:
2012-09-29 11:04:32.217 gw_fakeapp[8016:fe03] *** Terminating app due to uncaught exception 'com.facebook.sdk:InvalidOperationException', reason: 'FBSession: an attempt was made reauthorize permissions on an unopened session'
*** First throw call stack:
(0x14c9022 0xfe2cd6 0x14c8ee1 0x171d1 0x14367 0x3ad8 0x14cae99 0x14814e 0x386a0e 0x14cae99 0x14814e 0x1480e6 0x1eeade 0x1eefa7 0x1ee266 0x16d3c0 0x16d5e6 0x153dc4 0x147634 0x1da9ef5 0x149d195 0x1401ff2 0x14008da 0x13ffd84 0x13ffc9b 0x1da87d8 0x1da888a 0x145626 0x28ed 0x2815)
terminate called throwing an exception(lldb)
Does anyone have a working project I could compare mine with?
Thank you!
Phil
You can download sample of codes from developer.apple.com which describe about Facebook post publishing.
Here is the link: https://github.com/downloads/facebook/facebook-ios-sdk/FacebookSDK-3.1.pkg

FB - Problem with getting "manage_page" permission

I'm using the following to get "manage_page" permission.
https://www.facebook.com/dialog/oauth?client_id=MY_APP_ID&redirect_uri=MY_SITE_URL&scope=manage_pages&response_type=token
But when I goto this link, it was successful and redirected to MY_SITE_LINK. But when tested on another FB user, it gives an error saying:
Sorry, something went wrong.
We're working on getting this fixed as soon as we can.
What happened ?
My_site_url is canvas URL? Like http://apps.facebook.com/…

iphone twitter and sharing

Has anyone encountered the following error message when sending to Twitter?
"Error: Incorrect signature"
And on the debug console:
<0xf14cf80 SHKTwitter.m:(356)> Twitter Send Status Error: {"request":"\/1\/statuses\/update.json","error":"Incorrect signature"}
So far as I can tell I've followed the install instructions on http://www.getsharekit.com/install/#download and it is working with Facebook, e-mail etc. just not Twitter.
It would be great if someone has seen this error before and goes "aha!".
All I did to enable twitter Sharing is:
Regitered my App as a Twitter APP (Application Type: Browser)
#define SHKTwitterConsumerKey #"My..."
#define SHKTwitterSecret #"My..."
#define SHKTwitterCallbackUrl #"http://www.anything.com/callback" // You need to set this if using OAuth, see note above (xAuth users can skip it)
\#define SHKTwitterUseXAuth 0 // To use xAuth, set to 1
\#define SHKTwitterUsername #"" // Enter your app's twitter account if you'dlike to ask the user to follow it when logging in. (Only for xAuth)
Note that for the callback function you can enter any URL you want. even www.google.com. Just make sure it is the same URL in your code.
The issue is that you're signed into your twitter account, and allowed the app to connect to your profile.
However, days go by, the Key and Secret change, and now you're seeing this error. It's because you have to log out and re-log back into Twitter. I spent waaay too much time finding this out when I created a new Twitter App to hook into (and organize my apps) and found this error.
Basically, ShareKit is saving your login info, auto-logging you in, and getting the error when twitter says the app doesn't have permission to connect to your profile.
Follow these steps to log yourself out and test again :
http://www.getsharekit.com/docs/#logout
Check this previous SO question, it might be able to help you solve the problem:
Twitter API status update always returns "Incorrect signature"