Comments (7)
Hello @sumitk1
Added Linkedin Example
1eba285
Using NSXMLParser if need...
from oauthswift.
Hi @dongri this worked like a charm. Thanks for the help! I am using NSXMLParser for this as well.
from oauthswift.
Hello @dongri
Can you guide me here, what i am doing wrong here.
`let oauthswift = OAuth1Swift(
consumerKey: "myKeyHere",
consumerSecret: "mySecretHere",
requestTokenUrl: "http://sitename/wc-api/v2/products",
authorizeUrl: "http://sitename/wc-api/v2/products",
accessTokenUrl: "http://sitename/wc-api/v2/products"
)
//oauthswift.authorize_url_handler = get_url_handler()
oauthswift.authorizeWithCallbackURL( NSURL(string: "sitename/wc-api/v2/products")!, success: {
credential, response, parameters in
// self.showTokenAlert(serviceParameters["name"], credential: credential)
self.testOauth(oauthswift)
}, failure: { error in
print(error.localizedDescription)
}
)
func testOauth(oauthswift: OAuth1Swift) {
oauthswift.client.get("http://sitename/wc-api/v2/products", parameters: [:],
success: {
data, response in
let jsonDict: AnyObject! = try? NSJSONSerialization.JSONObjectWithData(data, options: [])
print("jsonDict: \(jsonDict)")
}, failure: { error in
print(error)
})
}`
I cannot get the data in jsonDict. It gives me this error:
HTTP Status 404: Not Found, Response:
{"errors":[{"code":"woocommerce_api_authentication_error","message":"oauth_consumer_key parameter is missing"}]}
Can you help me here.
Thanks
from oauthswift.
Your callback URL into authorizeWithCallbackURL is wrong and others also in init...
Why commenting an Old closed issue
from oauthswift.
Look into woocommerce oauth API to find the good urls
from oauthswift.
@phimage Can you guide me here, what should be the correct code?
from oauthswift.
Did you read my message, go to oauth Doc of woocommerce... I can help but not work for you, try by yourself...
from oauthswift.
Related Issues (20)
- Can't allow cookies for url request
- how can I send http request with url scheme? HOT 1
- Small buttons after login on webview OAuth2
- Twitch Dev URL Scheme Issue HOT 2
- OAuthSwiftError -10 after canceling redirection to app HOT 3
- Connot Run on Linux HOT 3
- OAuthSwift authorize : States not equal in response. HOT 1
- Canceling Apple ID isn't handled
- Swift Concurrency HOT 1
- Call to /request_token after canceling a request fails with HTTP 401 because oauth_token is already set.
- Cannot redirect to the app after autosubmit credentials HOT 4
- the closure for the authorize function callback is not being executed at all. HOT 2
- url scheme no works,debug out HOT 2
- Twitter SignIn - SessionStorage Error HOT 3
- A
- visionOS Support HOT 1
- Trying to use different JSON properties in token result HOT 1
- Does not work with Zotero Oauth HOT 3
- It takes a while to show the authorization web page
- Dismissing ASWebAuthenticationSession alert not handled
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oauthswift.