Noob query about relating newsgroup reference id to http location - newsgroup

I know this is not much programming related, but I would appreciate if someone could tell me on how to (if possible) a newsgroup reference id to a webpage.
Say, If the reference id of the newsgroup message is
<b6c92e67-0bbd-4dd1-be22-4357373fd19a#q35g2000vbi.googlegroups.com>
How do go to http page containing the post.

Message-Ids don't have anything to do with web pages or URLs. They are generated as a unique identifier for each post.
You can search for them with Google, of course, Google's Groups Search gives results.

Related

Best way to design a URI for REST API

I am designing a REST API with similar functionality as of Posts and Comments in Facebook.
URI looks like:
/posts/{post-id}/comments/{comment-id}
To get all the comments I use the collection URI naming standard. For example:
/posts/{post-id}/comments
But I am having difficulty when I need comments for all the posts. What would be the best way to incorporate that keeping in mind that I want to use this design only for posts and comments?
Edit
I have to mention here that the resources I am using are a bit different from posts and comments in a way that the in my design I will have to use posts and cannot have comments as entirely different entity. Sorry for the misunderstanding.
Said that, is it recommended to design URI in any of these ways:
/posts//comments
/posts/"any-string"/comments
But i am having difficulty when i need comments for all the posts. What would be the best way to incorporate that keeping in mind that i want to use this design only for posts and comments.
HTTP includes the concept of redirection - a general facility for telling the client to send a request to some other resource.
GET /714eeebd-d89e-4f13-b2a8-cf8a3ee03481 ...
307 Temporary Redirect
Location: /7604abf9-d4f5-42c7-b687-96dbff32649f
What this means is that, if you choose the wrong spelling for your URI, you can correct it later.
The design of REST is such that identifiers are opaque - nobody other than the server is supposed to be extracting information from them.
Also, keep in mind that resources are not domain entities -- it's normal to have many more resources than you have domain objects. Any given Post in your domain model might have many different resources that show it.
If you are really developing a REST service, and you want to "help" clients by making it difficult to cheat, you may want to abandon the idea of using a hackable identifier.
All that said
/comments
is a perfectly reasonable collection identifier all on its own, and its perfectly reasonable to create an identifier hierarchy under that root.
Below URI should serve the purpose.
/comments
For the above given example, let's understand the relationship of entities and URI:
posts and comments are two entities on its own.
when you need only posts and just passing post_id
To retrieve the posts:
/posts
To retrieve a specific post:
/posts/{post_id}
when you need only comments and just passing comment_id
To retrieve all comments:
/comments
To retrieve specific comment:
/comments/{comment_id}
when you need comments for a given post by passing both post_id and comment_id
To retrieve comments on a post:
/posts/{post_id}/comments
To retrieve specific comment for given post:
/posts/{post_id}/comments/{comment_id}
Hope it solves your issue.

(#371) Some subcategories don't represent a place

I'm getting this error when sending some place_topics on an update request to the Facebook Graph API for a given Facebook Location Page.
{"error"=>{"message"=>"(#371) Some subcategories don't represent a place.", "type"=>"OAuthException", "code"=>371, "error_subcode"=>1721087, "fbtrace_id"=>"CIewiBZL+jf"}}
It is fixed by changing the category_id for another one. BTW, I would like to know if is there a way of knowing which categories are allowed and which ones doesn't. It would be nice to know it in advance to disallow some of the Facebook Categories in the editing process of our tool and avoid errors.
Thanks,
David.
Use search?type=placetopic&topic_filter=all in graph explorer to get list of valid place topics

Facebook Graph API tag friend(s) while post message

I want post some message and tag friends like facebook (web version) does. For example, "simple message #SomeUser". So the question is: how can i tag friends and what is the easiest way to do that?
As i understand there are two ways to do that:
1) https://developers.facebook.com/docs/graph-api/reference/v2.1/user/feed#pubfields but i don't understand why should i provide place id in order to tag friends and where to get (or generate ???) it. Moreover i don't understand where should i get user id. https://developers.facebook.com/docs/graph-api/reference/v2.1/user/taggable_friends? I don't know because request always fails.
2)https://developers.facebook.com/docs/opengraph/using-actions/v2.1#mentions ? I've tried #[userTaggingToken] and replaced userTaggingToken with user id from /user/taggable_friends. But it doesn't work too. Moreover, user id from /user/taggable_friends is much longer than one provided by example.
I abstract from any sdk so please don't refer to any programming language (and its SDK). Any links to documentation and examples with concrete requests (like .../v2.1/user/feed) and data should be passed (message="...") are welcome.

Video Tags No Longer Available Via YouTube API?

About a month ago YouTube decided to get rid of it's "tags" from the frontend of their website:
http://youtubecreator.blogspot.com/2012/08/tags-removed-from-video-watch-pages.html
Which also in turn left media:keywords blank through any API feed request as read here:
http://apiblog.youtube.com/2012/08/video-tags-just-for-uploaders.html
The nice thing was for another month or so (until a few days ago) you could still access a video's "tags" or "keywords" through the API by looping through the category term(s)
It seems YouTube has taken that away also and it now only displays ONE category term for each API feed...and most of the time they are the basic YouTube categories like "Music" or "People" etc.
My questions to the YouTube development team is why was this taken away from the API (I understand taking it away from the frontend of the website) and will it ever return in any form to the API?
In the original Creators blog post you guys stated:
"Tags remain an important way to organize and help others find your videos. We strongly encourage you to continue tagging videos -- this will help increase your audience by improving the discoverability of your content."
So if Tags are still important and still utilized for search results...why in the world are they not available through the API anymore?
Any help and/or info would be greatly appreciated as this has completely destroyed the functionality of MANY of my sites! Thank you.
It appears they've made them private and you must use an authorized API request with adequate channel privileges to access them now. This really sucks since I've used them for filtering videos from a channel on a site and making authorized connections to the API via PHP has been complicated for me to get working correctly.
And the fact that this added complication is ONLY for keywords seems a bit ridiculous, but I don't guess the Youtube API team cares.
Unless a WHOLE lot of people complain about it, I doubt they'll add this back as a public.
I just added
Update: This change also applies to <category
scheme="http://gdata.youtube.com/schemas/2007/keywords.cat"> tags,
which were not mentioned in the original announcement.
to the announcement blog post. <category> tags should have been removed for the same reason <media:keywords> was removed, but due to an oversight they were left in unauthenticated API responses for a few weeks. There are no plans to add back keyword information via either metadata field.
If your goal is to have some semantics in the video, Freebase Topics can help. You can for instance do a JSONp call
<script src="https://www.googleapis.com/freebase/v1/topic${item}?filter=/type/object/name&callback=putFBname"></script>
with a small javascript function
<script>
function putFBname(respuesta){
span=document.getElementById(respuesta["id"]);
span.innerHTML=" "+respuesta["property"]["/type/object/name"]["values"][0]["text"];
}
</script>
to get the name of the topic.
Freebase topics come in the API v3.

Optimal Database design regarding functionality of letting user share posts by other users

I want to implement functionality which let user share posts by other users similar to what Facebook and Google+ share button and twitter retweet.
There are 2 choices:
1) I create duplicate copy of the post and have a column which keeps track of the original post id and makes clear this is a shared post.
2) I have a separate table shared post where I save the post id which is a foreign key to post id in post table.
Talking in terms of programming basically I keep pointer to the original post in a separate table and when need to get post posted by user and also shared ones I do a left join on post and shared post table
Post(post_id(PK), post_content, posted_by)
SharedPost(post_id(FK to Post.post_id), sharing_user, sharedfrom(in case someone shares from non owners profile))
I am in favour of second choice but wanted to know the advice of experts out there?
One thing more posts on my webapp will be more on the lines of facebook size not tweet size.
I would suggest that your system would do one of the two:
Put code inline for the post (similar to a hyperlink) that would reference the original post. I do not know if you are trying to pull in images or other media. When you encounter this inline code, your system could either create a hyperlink to view the original or pull data from the original into the post that is sharing it.
Alternatively your poststable could have a column for shared_post that could either be a post_id or a hyperlink to an external item to share. Your system can then recognize that if the value is null or -1 that it is not a shared post and can treat it normally.
I would not recommend creating a new table for storing duplicates of the shared posts. It becomes harder to maintain and update.
Additionally, if you plan on having sharing groups involved in this system, you will most likely need another table that links post_id to sharing_group_id.