Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

publishStream URLs with query strings not working #3

Closed
lauraskelton opened this issue Aug 15, 2010 · 3 comments
Closed

publishStream URLs with query strings not working #3

lauraskelton opened this issue Aug 15, 2010 · 3 comments

Comments

@lauraskelton
Copy link

Am I missing something? When using publishStream I want to include the URL to a specific product that includes a query string as the href for the post to link to, set in the "attachment" NSDictionary with the key "href" in the - (IBAction) publishStream: (id)sender method. It works fine if I use a URL with no query string, but if there is an ampersand in the url it doesn't send any of the data (name, caption, description, or url) to the Facebook post.

The same URL worked fine with the previous version of the Facebook iPhone sdk, and no way of escaping the & seems to work.

@lshepard
Copy link
Contributor

Thanks for the report, I've reproed the issue. We'll investigate and post an update.

@yujuan
Copy link

yujuan commented Aug 16, 2010

Thanks for the report. I just push in a fix which should have fix the issue. Let me know if it is working. Thanks!

@lauraskelton
Copy link
Author

Works great! Thanks for fixing.

caabernathy pushed a commit that referenced this issue Feb 7, 2012
Summary:
Currently when there is a Platform API call that has any error or if there is a
connection error, e.g. timeout, the access token is invalidated. This was due
to
diff D378197 where any errors call invalidSession. To fix this narrow the
invalidate call to the scenario where the access token has expired when an API
call
is made.

For now, only REST API error codes allow us to easily identify an invalid token
(error code 190). A separate diff will be implemented by the Platform team
to provide an error code for Graph API auth token errors.

Test Plan:
Case #1
1/ Login
2/ Tap Graph API
3/ Tap Get your friends
4/ Go off LAN and WiFi
5/ Tap Get your friends

Case #2
1/ Turn WiFi back on
2/ Tap Get your friends
3/ See friends list
4/ Go back to get to Graph API page
5/ Remove app from https://www.facebook.com/settings/?tab=applications
6/ Tap Get your friends

Case #3
1/ Temporarily modified code to force a Graph API error
     //[[delegate facebook] requestWithGraphPath:@"me" andParams:params
andDelegate:self];
     [[delegate facebook] requestWithGraphPath:@"000000" andParams:params
andDelegate:self];
2/ Tap Graph API
3/ Tap Get your information

Before this change, here were the results
Case #1: Session expires message, which is incorrect behavior
Case #2: Session expires message, which is correct behavior
Case #3: Session expires message, which is incorrect behavior

After this change, here are the results
Case #1: Get the Hackbook "Oops something went wrong" message, which is desired
behavior
Case #2: Get the Hackbook "Oops something went wrong" message, which is not
ideal, user should also be logged out
Case #3: Get the Hackbook "Oops something went wrong" message, which is desired
behavior

Reviewers: yariv, jimbru, brent, toddkrabach, jonathan

Reviewed By: yariv

CC: lshepard, selekman, beau, bgolub, danmuriello, jacl

Differential Revision: https://phabricator.fb.com/D402481

Revert Plan: OK

Task ID: 900407
ghost pushed a commit to WeTransferArchive/facebook-ios-sdk that referenced this issue Mar 2, 2012
Summary:
Currently when there is a Platform API call that has any error or if there is a
connection error, e.g. timeout, the access token is invalidated. This was due to
diff D378197 where any errors call invalidSession. To fix this narrow the
invalidate call to the scenario where the access token has expired when an API call
is made.

For now, only REST API error codes allow us to easily identify an invalid token
(error code 190). A separate diff will be implemented by the Platform team
to provide an error code for Graph API auth token errors.

Test Plan:
Case facebook#1
1/ Login
2/ Tap Graph API
3/ Tap Get your friends
4/ Go off LAN and WiFi
5/ Tap Get your friends

Case facebook#2
1/ Turn WiFi back on
2/ Tap Get your friends
3/ See friends list
4/ Go back to get to Graph API page
5/ Remove app from https://www.facebook.com/settings/?tab=applications
6/ Tap Get your friends

Case facebook#3
1/ Temporarily modified code to force a Graph API error
     //[[delegate facebook] requestWithGraphPath:@"me" andParams:params
andDelegate:self];
     [[delegate facebook] requestWithGraphPath:@"000000" andParams:params
andDelegate:self];
2/ Tap Graph API
3/ Tap Get your information

Before this change, here were the results
Case facebook#1: Session expires message, which is incorrect behavior
Case facebook#2: Session expires message, which is correct behavior
Case facebook#3: Session expires message, which is incorrect behavior

After this change, here are the results
Case facebook#1: Get the Hackbook "Oops something went wrong" message, which is desired
behavior
Case facebook#2: Get the Hackbook "Oops something went wrong" message, which is not
ideal, user should also be logged out
Case facebook#3: Get the Hackbook "Oops something went wrong" message, which is desired
behavior

Reviewers: yariv, jimbru, brent, toddkrabach, jonathan

CC: lshepard, selekman

Differential Revision: https://phabricator.fb.com/D402481

Revert Plan: OK

Task ID: 900407
@devSC devSC mentioned this issue Dec 29, 2023
5 tasks
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants