Getting Signature Key
|
|
The first step in using our Social Event Manager WebService is getting the signature key, signature
key(transaction id) is found on your receipt email which you receive from StesCodes after you make purchase and
also on your customer account. The transaction id of StesCodes is refered to as signature key.
Inorder to use the trial, you need to generate the key here
http://stescodes.com/trial.aspx. You shall get the key based on the selection
of plan.
|
|
back to top
|
Social Event Manager
|
|
The next step after getting the signature key, is creating reference.
|
Reference
|
- Add reference to stescodes_eval.dll on your project bin folder
- Import the namespace "stescodes_eval"
- Right click on your solution and click "Add Web Reference"
- Provide "
https://www.stescodes.com/stescodesevents.asmx" in the url field and click GO
- Provide Web reference_name (eg: stescodes_em)
- Click Add_Reference, now you can access the below functions
- GetAuthenticationUrl
- GetAccessToken
- GetEvents
- CreateEvents
- Check out the WSDL link here https://www.stescodes.com/stescodesevents.asmx?wsdl
| Note: |
You shall download the stescodes_eval.dll for .net 2008 here Download
You shall download the stescodes_eval.dll for .net 2010 here Download
|
|
|
back to top
|
Settings
|
|
Add the below appsettings on your web.config file
<add key="signaturekey" value="Your Signature key"/>
<!--//////////////// SOCIAL EVENTS ///////////////-->
<!-- To get Google Events api key use this https://code.google.com/apis/console/?pli=1#welcome: -->
<add key="googleapikey_EM" value="Google API key here"/>
<add key="googleapisecret_EM" value="Google API secret key here"/>
<!-- To get Yahoo Events api key use this https://developer.apps.yahoo.com/projects -->
<add key="upcomingapikey_EM" value="Upcoming api key here"/>
<add key="upcomingapisecret_EM" value=""/>
<!-- To get Live Events api key use this https://manage.dev.live.com -->
<add key="liveapikey_EM" value="Live api key here"/>
<add key="liveapisecret_EM" value="live api secret key here"/>
<add key="policyurl" value="your policy page url"/>
<!-- To get Facebook Events api key use this http://www.facebook.com/developers/ -->
<add key="facebookapikey_EM" value="Facebook API key here"/>
<add key="facebookapisecret_EM" value="Facebook API secret key here"/>
<!-- To get Live Events api key use this http://www.last.fm/api/account -->
<add key="lastfmapikey_EM" value="last.FM API key here "/>
<add key="lastfmapisecret_EM" value="last.FM secret key here"/>
|
|
back to top
|
Methods
|
|
To start grabbing events using OAuth Method, you have to make request to three functions
- GetAuthenticationUrl
- GetAccessToken
- GetEvents
- CreateEvents
To configure API keys in facebook, google, live, upcoming and lastfm click here
How to configure API keys.
|
|
Function for GetAuthenticationUrl
|
|
UserToken listau = GetAuthenticationUrl(serviceName, ConsumerKey, ConsumerSecret, CallbackUrl, policyurl);
|
|
Parameters
|
|
Parameters
|
Description
|
Required?
|
|
1. ServiceName
|
Service Name refers to the socialnetwork name. Inorder to access a service use the below
reference keywords
facebook, google, live, upcoming and lastfm.
|
Yes
|
|
2. ConsumerKey
|
Consumer key(API Key) which you received after registering you application on facebook, google, live, upcoming and lastfm.
|
Yes
|
|
3.ConsumerSecret
|
Consumer Secret(APi Secret) which you received after registering you application on facebook, google, live, upcoming and lastfm,
|
Yes
|
|
4. callbackurl
|
CallbackURL is the return url which is used, once the user is redirected to authorize, he/she will be redirected to the callbackurl
(note: sometimes you might get error with callbackurl between www.xx.com and xx.com, so carefull with
www)
|
Yes
|
|
5. policyurl
|
URL of your policy page.
|
Yes
|
|
|
Return type
|
The return type is collection.
- authurl
- Token
- TokenSecret
- TokenVerifier
- UID
- error
|
|
|
|
Function for GetAccessToken
|
|
UserToken listau = getAccessToken(serviceName, ConsumerKey, ConsumerSecret, CallbackUrl, Token, TokenSecret, TokenVerifier, formatedsignaturekey);
|
|
Parameters
|
|
Parameters
|
Description
|
Required?
|
|
1. ServiceName
|
Service Name refers to the social network name. Inorder to access a service use the below
reference keywords
facebook, google, live, upcoming and lastfm.
|
Yes
|
|
2. ConsumerKey
|
Consumer key(API Key) which you received after registering you application on facebook, google, live, upcoming and lastfm.
|
Yes
|
|
3.ConsumerSecret
|
Consumer Secret(APi Secret) which you received after registering you application on facebook, google, live, upcoming and lastfm.
|
Yes
|
|
4. callbackurl
|
CallbackURL is the return url which is used, once the user is redirected to authorize, he/she will be redirected to the callbackurl
(note: sometimes you might get error with callbackurl between www.xx.com and xx.com, so carefull with www)
|
Yes
|
|
5. Token
|
Token which you received through callback url after user redirection from authorization page.
|
Yes
|
|
6. TokenSecret
|
TokenSecret which you receive from "getAuthenticationUrl" as return parameters.
|
Yes/No
|
|
7. TokenVerifier
|
TokenVerifier which you received through callback url after user redirection from authorization page.
|
Yes/No
|
|
8. Signature
|
Formated Signature:
In order to format the signature key, make reference of "processor" class and then
pass your signature key along with the HttpContext object associated with the page
as input parameter to "getSecretKey", which is a function of "processor" class.
The signature must be formatted before making a request.
|
Yes
|
|
|
Return type
|
The return type is collection.
- authurl
- Token
- TokenSecret
- TokenVerifier
- UID
- error
|
|
|
|
Function for GetEvents
|
|
eventdetails[] list_events = GetEvents(serviceName, Token, TokenSecret, ConsumerKey, ConsumerSecret, uid, Signature);
|
|
Parameters
|
|
Parameters
|
Description
|
Required?
|
|
1. ServiceName
|
Service Name refers to the socialnetwork name. Inorder to access a service use the below
reference keywords
facebook, google, live, upcoming and lastfm.
|
Yes
|
|
2. Token
|
Token which you received from "GetAccessToken" as return parameter.
|
Yes
|
|
3. TokenSecret
|
TokenSecret which you receive from "GetAccessToken" as return parameters.
|
Yes/No
|
|
4. ConsumerKey
|
Consumer key(API Key) which you received after registering you application on facebook, twitter, linkedin and google.
|
Yes
|
|
5.ConsumerSecret
|
Consumer Secret(APi Secret) which you received after registering you application on facebook, twitter, linkedin and google.
|
Yes
|
|
6. uid
|
userid
|
Yes/No
|
|
7. Signature
|
Formated Signature:
In order to format the signature key, make reference of "processor" class and then
pass your signature key along with the HttpContext object associated with the page
as input parameter to "getSecretKey", which is a function of "processor" class.
The signature must be formatted before making a request.
|
Yes
|
|
|
Return Types
|
The return type is collection.
- eventurl
- calendarname
- endtime
- id
- location
- name
- rsvp
- picture
- starttime
- description
- error
|
|
|
|
Function for CreateEvents
|
|
string status = sendInvitation(serviceName, Token, TokenSecret, ename, edesc, estartdate, estarttime, eenddate, eendtime, elocation, eRSVP, ConsumerKey, ConsumerSecret, signature);
|
|
Parameters
|
|
Parameters
|
Description
|
Required?
|
|
1. ServiceName
|
Service Name refers to the socialnetwork name. Inorder to access a service use the below
reference keywords
facebook, google, live, upcoming and lastfm.
|
Yes
|
|
2. Token
|
Token which you received from "GetAccessToken" as return parameter.
|
Yes
|
|
3. TokenSecret
|
TokenSecret which you receive from "GetAccessToken" as return parameters.
|
Yes/No
|
|
4. eName
|
Name of your event.
|
Yes
|
|
5. eDescription
|
Description of your event.
|
Yes
|
|
6.eStartDate
|
Event start date in format mm/dd/yyyy.
|
Yes
|
|
7.eStartTime
|
Event start time in format(hh:mm:ss)
|
Yes
|
|
8.eEndDate
|
Event end date in format mm/dd/yyyy.
|
Yes
|
|
9.eEndTime
|
Event end time in format(hh:mm:ss)
|
Yes
|
|
10.eLocation
|
Location where you host your event.
|
Yes
|
|
11.eRSVP
|
RSVP
|
Yes
|
|
12. ConsumerKey
|
Consumer key(API Key) which you received after registering you application on facebook, google, live, upcoming and lastfm.
|
Yes
|
|
13.ConsumerSecret
|
Consumer Secret(APi Secret) which you received after registering you application on facebook, google, live, upcoming and lastfm.
|
Yes
|
|
14. Signature
|
Formated Signature:
In order to format the signature key, make reference of "processor" class and then
pass your signature key along with the HttpContext object associated with the page
as input parameter to "getSecretKey", which is a function of "processor" class.
The signature must be formatted before making a request.
|
Yes
|
|
|
Return Types
|
|
The return type is string.
status
|
|
|
Debugging
|
|
Debugging Windows Live:
Debugging for Hotmail, MSN and msnmessenger is hard when compared to other services because in OAuth method, for the
three services, you receive the token in post data other than in querystring. So follow the below steps to debug in local
- Upload the auth.aspx page to your server.
- Do the below five steps when the user is redirected after authentication.
- Get the post data and construct as a url with querystring parameter(for ex: token=xxx&tokensecret=yyyy as
http://youdomain.com/auth.aspx?token=xxx&tokensecret=yyyy)
- After constructing the parameter change the constructed url to localhost url(for ex: http://youdomain.com/auth.aspx?token=xxx&tokensecret=yyyy to
http://localhost:2345/yourproject/auth.aspx?token=xxx&tokensecret=yyyy
- Redirect to the localhost url(for ex: Response.Redirect(http://localhost:2345/yourproject/auth.aspx?token=xxx&tokensecret=yyyy);)
- Now you will get the token in localhost for debugging.
- Remove the redirection part after you done with your debugging.
|
Binding
|
|
Once the events are grabbed and received in collection object, you should loop
through to access the object and bind the data to front end, its all customizable.
|
|
back to top
|
Error Handling
|
|
There are few error messages you need to taken care on your end
|
Error Message
|
|
Error
|
Description
|
|
1. Invalid domain
|
The license(Signature Key) is not registered for this domain. You shall change/edit
your domain here http://stescodes.com/sourceupdate.aspx
|
|
2. Invalid key
|
The Signature Key is invalid.
|
|
3. Please try again
|
Please try again one more time.
|
|
4. This domain is not registered with StesCodes.com
|
The license(Signature Key) is not registered for this domain. You shall change/edit
your domain here http://stescodes.com/sourceupdate.aspx
|
|
5. Missing input
|
Missing the input parameter
|
|
6. This service not available on your plan
|
The service you are requesting to grab contacts are not available on your purchased
plan.
|
|
|
back to top
|
Change Domain
|
|
If you get the domain is invalid and you purchased license for that domain, then
you shall follow the below steps to update your domain.
|
Edit/Change Domain
|
To edit or change your domain
- Login to http://stescodes.com/sourceupdate.aspx
- You shall login using email and password which you received in email during purchase
or you shall use the StesCodes transaction id
- Once you login, click the edit link near website
- Enter the domain details
- Click "proceed" to save.
|
|
back to top
|