What API I should use to post items from asp.net (C#) web application to amazon.com ?
please guide me to proper documentation and steps.
What I am looking for is how to add new item into certain category and pass the item title/description/pictures/price etc... -- plz advice
Thanks
You're question is a bit vague, but this was the most useful link I found when researching into how to interface with Amazon using C# -
http://flyingpies.wordpress.com/2009/08/01/17/
You need the Marketplace Web Services API. Found at http://developer.amazonservices.com.
You then need the flat file feed specifications to send the flat file in the correct format to the MWS. That can be found after you're logged into your seller central account:
https://sellercentral.amazon.com/gp/help/help.html/ref=ag_13461_cont_help?ie=UTF8&itemID=13461&language=en_US
From there, you can simply send to the MWS the data you need. Here is a snippet of my code:
SubmitFeedRequest req = new SubmitFeedRequest();
req.ContentMD5 = MarketplaceWebServiceClient.CalculateContentMD5(feedContent);
feedContent.Position = 0;
req.FeedContent = feedContent;
req.FeedType = "_POST_FLAT_FILE_INVLOADER_DATA_";
req.PurgeAndReplace = false;
req.Marketplace = MarketPlaceId;
req.Merchant = MerchantId;
return Service.SubmitFeed(req);
Assuming that by 'posting' you mean posting new items into the amazon marketplace, you can use
this api https://affiliate-program.amazon.com/gp/advertising/api/detail/main.html
Also google works wonders for searching
It sounds to me like you need the Amazon Market Place Feeds API.
https://developer.amazonservices.co.uk/gp/mws/api.html?ie=UTF8§ion=feeds&group=bde&version=latest
You can use SubmitFeed to send product and inventory information to Amazon
Related
I would like to know a very simple way of getting the list of videos that were uploaded by user/or videos in a channel.
For example, I want to retrieve basic information about videos those were posted in the Youtube spotlight channel (http://www.youtube.com/user/YouTube/videos). All I need is read-only publicly available information.
I am so lost with the Youtube v2/v3 API / Google APIs etc. I could partially make one example work but I think all the examples are heavily biased towards "third-party" access. I started developing one example by looking at their samples and when I compiled and ran the application - it was asking me to sign-in to my google account.
Any help is greatly appreciated. Thanks.
For the sake of simplicity you can use the api v2 like this:
const string channelName = "YourChannel";
var URL =string.Format("http://gdata.youtube.com/feeds/api/users/{0}/uploads",
channelName);
using (var reader = new XmlTextReader(URL))
{
while (reader.Read())
{
if (reader.Name.Equals("media:player"))
{
string attribute = reader["url"];
if (attribute != null)
{
Response.Write("Youtube Video Link" + attribute + "<br />");
}
}
}
}
You can achieve similarly using v3 but It will require some more work
I am using ASP.net C# for a web application that integrates with the Facebook API. My application will allow users to create a group for sharing code. I need to use Facebook API to let the user invite friends from Facebook to join his group on my application. This is a requirement for an assignment so please don't give suggestions to create a group of users that are registered with my site only.
Until now I have the request dialog with all the friends listed (MultiFriendSelector()) with this code:
<p> Click <span id="span-link" onclick="sendRequestViaMultiFriendSelector(); return false;">here</span> to add friends from your Facebook account to your group! </p>
But I am stuck on how to get the id's and details of these invited users so I can save them in my database and allow them to access the group they were invited to. How can I do this please? I can't seem to find anything related to this.
By the way I know that there is a related question which gives this code:
if( Request["ids"] != null )
((Site)Master).FbInviteSent(Request.QueryString.GetValues("ids"));
but I don't know what Master is and I cant get it to work.
Thanks for your help :)
Whenever you call the request dialog, you may pass a callback function:
function sendRequestViaMultiFriendSelector() {
FB.ui({method: 'apprequests',
message: 'My Great Request'
}, requestCallback);
}
The requestCallback will receive the response, and this response returns the facebook id of the users, who were invited
function requestCallback(response){
for (var i = 0; i < response.to.length; i++) {
fb_id = response.to[i];
// Do something with fb_id.
}
}
From looking at the code in the other answer it looks like the facebook API will call back to your page with a query string parameter of ids.
I.e. It will call you site with a url like this.
http://wwww.yoursitesulr.com/mypage.aspx?ids=13,22,44
You can then pull out the id's from the query string using
string myIds = Request.QueryString["ids"];
You can then convert them to a array.
var ids = myIds.Split(',');
If you are using MVC then you can take advantage of the model binders and just put an int array in your view model and it will get bound automatically.
The answer below addresses your specific issie so I would use this as a starting point.
Faceboook: Posting to Multiple Friend's Walls Using Multiple Friend Selector and JS SDK
Let me know if you have any questions regarding the above solution.
Regards
Steve
I am trying to access data remotely from sharepoint 2010 site using client object model. For some restrictions I am not able to use CAML query even if I use I am not able to filter for proper audiences based on user login (if you can help me regarding the CAML query is also fine :: i do not know how to get current user audience name and all audiences using CAML/client object model. This code sits on the mobile site and calling the share point site as shown in my code). This following code works good but not able to get the content from the webpart. Can someone help regarding this.
using (ClientContext ctx = new ClientContext("https://mysite.com/Pages/Default.aspx"))
{
ctx.ExecutingWebRequest += new EventHandler<WebRequestEventArgs> (clientContext_ExecutingWebRequest);
File home=ctx.Web.GetFileByServerRelativeUrl("/Student/Pages/default.aspx");
//get the web part manager
Microsoft.SharePoint.Client.WebParts.LimitedWebPartManager wpm = home.GetLimitedWebPartManager(Microsoft.SharePoint.Client.WebParts.PersonalizationScope.Shared);
IEnumerable<Microsoft.SharePoint.Client.WebParts.WebPartDefinition> wpds = null;
//create the LINQ query to get the web parts from
//the web part definition collection
wpds = ctx.LoadQuery(wpm.WebParts.Include(wp => wp.Id,wp => wp.WebPart));
//load the list of web parts
ctx.ExecuteQuery();
//enumerate the results
foreach (Microsoft.SharePoint.Client.WebParts.WebPartDefinition wpd in wpds)
{
string title= wpd.WebPart.Title;
Microsoft.SharePoint.Client.WebParts.WebPart wpart = wpd.WebPart;
????? How to render and receive the data (looking for the same data When you browse the site with the browser)
}
Code continues...
I am also struggling with this issue. It really looks like this is not possible with client object model. Actually i've asked it to some SharePoint staff member at Build Conference 2012.
But, with the SharePoint Designer it's actually possible to download the wanted WebPart. Fiddler may come handy to track down which service will deliver you the bits.
Take a look at this post here on SharePoint StackExchange
Unfortunately the post will not give you any concrete way to solve it.
Wish you good luck!
As per this link code from stack overflow i have try this code for getting
friendslist but after login i got this error "requires valid signature"
string APIKey = ConfigurationManager.AppSettings["API_Key"];
string APISecret = ConfigurationManager.AppSettings["API_Secret"];
Facebook.Session.ConnectSession connectsession = new Facebook.Session.ConnectSession(APIKey, APISecret);
Facebook.Rest.Api api = new Facebook.Rest.Api(connectsession);
var friends = api.Friends.GetLists();
foreach (var friend in friends)
{
System.Console.WriteLine(friend.name);
}
guide me to find out the solution
Thanks
ash
If you are starting with a new application, you should definitely use the Graph API and not the old Rest API. The Rest API has been deprecated for quite a while now and there is no guarantee how much longer Facebook will support it.
For an example on using the Graph API try http://csharpsdk.org/docs/web/getting-started
You can obtain the friends list by making a request to me/friends
You can test other requests using the Graph API explorer.
i build mini Question Answering System in C#. I need retrieve document by google Search.
What is google tools name, i can use it in my project?
Thanks
One possibility is to set up a custom Google search engine. Then you also need to create a developer key, which I believe is done under the console.
After setting that up, you can make REST style call with code such as the following, which retrieves the results as JSON:
WebClient w = new WebClient();
string result;
string uri;
string googleAPIKey = "your developer key";
string googleEngineID = "your search engine id";
string template = "https://www.googleapis.com/customsearch/v1?key={0}&cx={1}&q={2}&start={3}&alt=json";
int startIndex = 1;
int gathered = 0;
uri = String.Format(template, googleAPIKey, googleEngineID, "yoursearchstring", startIndex);
result = w.DownloadString(uri);
For extracting the information from the JSON results, you can use something like Json.NET. It makes it extremely easy to read the information:
JObject o = JObject.Parse(result);
Then you can directly access the desired information with a single line of code.
One important piece of information is that the search API free usage is extremely limited (100 requests per day). So for a real-world application it would probably be necessary to pay for the search. But depending on how you use it, maybe 100 requests per day is sufficient. I wrote a little mashup using the Google search API to search for Stackoverflow site information of interest and then used the StackExchange API to retrieve the information. For that personal use, it works very well.
I've never used it before (and it's alpha), but take a look at Google APIs for .NET Framework library.