OpenSocial MCQs

OpenSocial MCQs

The following OpenSocial MCQs have been compiled by our experts through research, in order to test your knowledge of the subject of OpenSocial. We encourage you to answer these 50+ multiple-choice questions to assess your proficiency.
Please continue by scrolling down.

1:

Which of the following are the components of the OpenSocial API (v0.7)?

A.   JavaScript API

B.   Gadgets

C.   Google App Code

D.   RESTful API

2:

You can embed flash objects with OpenSocial (v0.7).

A.   True

B.   False

3:

If the content is a feed and you want to fetch the number of entries in OpenSocial (v0.7), which object field of class "gadgets.io.RequestParameters" will be used?

A.   AUTHORIZATION

B.   CONTENT_TYPE

C.   GET_SUMMARIES

D.   HEADERS

E.   METHOD

F.   NUM_ENTRIES

G.   POST_DATA

4:

Which of the following are the valid RequestParameters under 'gadgets.io. Parameters' namespace?

A.   POST_DATA

B.   GET_DATA

C.   CONTENT_TYPE

D.   SET_DATA

5:

What is the function of the "makerequest()" method in OpenSocial API (v0.7)?

A.   It is used to add new content by the user

B.   It is used to fetch content from other remote web servers and web pages

C.   It is used to make a request for adding the specific application

D.   It is used to make a request for accessing some particular application

6:

Which of the following namespaces are included in OpenSocial JavaScript API (v0.7)?

A.   OpenSocial-0.7.*

B.   MyOpenSpace.*

C.   OpenSocial.*

D.   gadgets.*

7:

Suppose you have chosen to install an OpenSocial API named "Games" in your orkut profile. Which of the following identities is taken by you by installing the application?

A.   VIEWER

B.   OWNER

C.   AUTHOR

D.   USER

8:

Which of the following are the supported keys for the Url.getField() method.?

A.   ADDRESS

B.   LINK_TEXT

C.   TYPE

D.   Referrer

9:

Consider the following code for OpenSocial application (v0.7) for Orkut? http://sandbox.orkut.com/Application.aspx?appId=xxxxxxxxxxxx&appParams=%7B%20%22hello%22%20%3A%20%22hi%22%20%7D If the above mentioned url is passed and processed by the following code, what will be the value of "getOutput"? var querydata = gadgets.views.getParams(); var getOutput = querydata["hello"];

A.   hello

B.   hi

C.   hello and hi

D.   hi and hello

E.   It will produce an empty string

10:

You can not send mails to friends by using OpenSocial (v0.7) for Orkut application?

A.   True

B.   False

11:

You have done a lot of testing in your OpenSocial API and now you want to delete all the "Persistence Data". The following method is used to clear the data: var req = OpenSocial.newDataRequest(); req.add(     req.newUpdatePersonAppDataRequest (OpenSocial.DataRequest.PersonId.VIEWER, --, --), "set_data"); req.send(set_callback); The above command has some arguments missing at --. Which of the following set of arguments will complete the above command?

A.   all, null

B.   *, null

C.   *, clear

D.   all, clear

12:

You have created an OpenSocial API  "test.xml" and integrated it into Google App Engine. You don't want just anybody to be able to access your application data through the "test.xml" API. What should you do in order to restrict access to the users?

A.   Add permissions on the API xml file

B.   Add Digital signatures to the API xml file

C.   Add username and password to the API xml file

D.   You cannot do it as it is a Javascript and HTML supported API

13:

Which of the following objects are defined in the 'add' method, under  'OpenSocial.DataRequest' namespace?

A.   newFetchPersonActivitiesRequest(idSpec, opt_params)

B.   newFetchPeopleRequest(idSpec, opt_params)

C.   newFetchPersonAppDataRequest(idSpec, keys)

D.   newUpdatePersonAppDataRequest(id, key, value)

14:

What will the following code fetch for variable "xyz" in OpenSocial for Orkut? Var xyz=gadgets.util.getUrlParameters()["gadgetId"];

A.   Current User ID

B.   Owner User ID

C.   Application ID

D.   View ID

15:

When you add an application to orkut sandbox by using OpenSocial (v0.7), which of the following types of users can add the application?

A.   Orkut users with sandbox access

B.   The application creator and his friends

C.   Any orkut user

D.   None of the above

16:

Which of the following Roles are defined in OpenSocial API (v0.7)?

A.   Viewer

B.   Owner

C.   Moderator

D.   Friend

E.   Admin

17:

Which of the following are compulsory for creating an OpenSocial (v0.7) application for Orkut?l API (v0.7)?

A.   Orkut ID

B.   Sandbox access

C.   Goggle page hosting

D.   Text editor

E.   Database access

18:

In Persistence API, the data store only accepts strings for storage, which means that you must convert complex data structures to strings before saving them. Which of the following functions is used to convert JavaScript objects and arrays to a string value?

A.   gadgets.json.stringify

B.   gadgets.io.stringify

C.   gadgets.io.encodeValues

D.   gadgets.io.text

19:

What is the fuctionallity of the "gadgets.MiniMessage" class in OpenSocial (v0.7)?

A.   To create messages that will appear to the user within the gadget

B.   To create messages which are being displayed on the main menu

C.   To create messages which are used to send emails to friends

D.   To create messages to access data from other web servers

20:

Which of the following are the constant identifiers in OpenSocial API?

A.   OWNER

B.   VIEWER

C.   USERS

D.   VIEWER_FRIENDS 

21:

Which of the following methods are defined under "OpenSocial.Permission" namespace?

A.   OpenSocial.hasPermission()

B.   OpenSocial.Permission.VIEWER

C.   OpenSocial.requestPermission()

D.   OpenSocial.getPermission()

22:

Suppose you have an OpenSocial API with the name "message.xml". You have integrated the API with the Google App Engine. The Google App Engine has the configuration file named "app.yaml". Now you want to handle the request generated by the OpenSocial API to the Google APP Engine? Which file will you configure in order to handle the request?

A.   message.xml

B.   app.yaml

C.   Both these files will be configured

D.   There is no need for configuration

23:

What is the functionality of the "getdomain" method in the Environment class in OpenSocial API (v0.7)?

A.   It displays the url of application

B.   It gives the current site on which the application is running

C.   It gives information about the gadget url and the language used

D.   All of the above

24:

In RESTful Data API, the server interactions are handled by _______ protocol and the Authentication is handled by _____.

A.   HTTPS, OAuth

B.   AtomPub, BBAuth

C.   HTTPS, BBAuth

D.   AtomPub, OAuth

25:

Which of the following are the valid ContentTypes under 'gadgets.io.ContentType' namespace?

A.   DOM

B.   FEED

C.   SCRIPT

D.   JSON

26:

What kind of data can be saved and retrieved in OpenSocial API (v0.7)?

A.   per-user

B.   global application

C.   per-application

D.   per-application instance

27:

With the help of the 'gadgets.io.makeRequest()'  function in OpenSocial API, you can _____.

A.   get a user's profile data

B.   get a user's friend lList

C.   delete "Persistence Data"

D.   add a user to the friend list.

E.   fetch content from other web servers and web pages

28:

Arrange in proper sequence how an application gets live in Orkut using OpenSocial (v0.7).(Starting with the 1st) 1. Submitting the application to orkut 2. Registration at sandbox 3. Adding the application in sandbox 4. Creating an account in orkut

A.   4,1,2,3

B.   4,2,3,1

C.   2,4,3,1

D.   2,4,3,1

29:

What will happen if "&bpc=1" is appended to an orkut application canvas page url as querystring?

A.   It will retain the cache of the page

B.   It will load a fresh copy of the page

C.   It will create cookies for the specific page

D.   It will create language specific views for the page

30:

If you want to handle the error of maximum usage of "Quotas" in OpenSocial (v0.7), which object field of the class "OpenSocial.ResponseItem.Error" will be used to handle the error?

A.   BAD_REQUEST

B.   FORBIDDEN

C.   FORBIDDEN

D.   NOT_IMPLEMENTED

E.   UNAUTHORIZED

31:

What does section specify in OpenSocial (v0.7)?

A.   Characteristics of the gadget

B.   Controls that allow the users to specify settings for the gadget

C.   Programming logic of the gadget

D.   Language used in the gadget

32:

Which of the following are the supported keys for the Person.getField() method.?

A.   ABOUT_ME

B.   NICKNAME

C.   LIKES

D.   TURN_OFFS

33:

Which statements are incorrect with regard to the implementation of OpenSocial (v0.7)?

A.   To implement OpenSocial, you require your own web hosting

B.   OpenSocial applications can't be made private

C.   To configure OpenSocial, database is required

D.   OpenSocial can be implemented only by using Javascript and XML

E.   OpenSocial is a product which requires licensing

34:

In OpenSocial API, "OpenSocial.IdSpec.Field" namespace is used _____.

A.   to get the groupid of the user

B.   to get the titleid of the message in message template

C.   to get the userid of the user

D.   to get the network distance between two users

35:

What is the function of the "gadgets.pubsub" namespace in OpenSocial API (v0.7)?

A.   It is used to create feed channels.

B.   It is used to publish messages to feed channels

C.   It is used to subscribe gadgets to a messaging channel

D.   It is used to unsubscribe gadgets from a messaging channel

36:

Which of the following Content Type Requests are handled by the gadgets.io.makeRequest(url, callback, opt_params) method?

A.   Text Requests

B.   DOM Requests

C.   HTTP Requests

D.   JSON Requests

E.   FEED Requests

37:

You have a collection of multiple objects and you want to retrieve the size of that collection. Which of the following methods will you use in order to calculate the collection size?

A.   getTotalSize()

B.   size()

C.   getCollectionSize()

D.   getsize()

38:

Which of the following 'DataRequest' methods will be used in order to read, write and clear data from Persistence API?

A.   newFetchPersonRequest(idSpec, opt_params)

B.   newFetchPersonAppDataRequest(idSpec, keys)

C.   newFetchPeopleRequest(idSpec, opt_params)

D.   newUpdatePersonAppDataRequest(id, key, value)

39:

In OpenSocial API, the "gadgets.Prefs" namespace enables the end user to _____.

A.   set preferences of the OpenSocial API

B.   set OpenSocial API module dimensions

C.   handle messages in API

D.   set Permissions of the API

40:

In the process of integrating OpenSocial API with Google App Engine, you do not need to maintain any servers.

A.   True

B.   False

41:

You have made a function named 'getfriends()', which will get the list of friends once the OpenSocial API is loaded. Which of the following event handler will call this function after the API has been loaded?

A.   gadgets.util.registerOnLoadHandler(getfriends);

B.   gadgets.io.makeRequest.getfriends();

C.   gadgets.util.registerOnLoadHandler.getfriends();

D.   gadgets.io.makeRequest(getfriends);

42:

Which of the following request is sent to the apiserver when an OpenSocial API wants to call the Google App Engine server for data,?

A.   fetch_data

B.   get_data

C.   get_data

D.   call

43:

What do you mean by "Activity" in OpenSocial API (v0.7)?

A.   Action performed by a user

B.   Addition of a new user

C.   Deletion of an existing user

D.   Moderation of users

E.   None of the above

44:

Which of the following languages are used for integrating OpenSocial API with Google App Engine?

A.   Javascript

B.   HTML

C.   C++

D.   JSON

E.   Python

45:

Persistence API provides a storage mechanism to save and load data. In which form is the data stored?

A.   It is stored in the form of data objects

B.   It is stored in the form of XML

C.   It is stored in the form of encrypted codes

D.   It is stored in the form of key/value pairs

46:

IN OpenSocial, errors are returned through 'OpenSocial.ResponseItem.Error' namespace. Which of the following is not an error code?

A.   NOT_FOUND

B.   NOT_IMPLEMENTED

C.   INTERNAL_ERROR

D.   UNAUTHORIZED

47:

Which of the following user general profile fields cannot be accessed in orkut applications for OpenSocial (v0.7)?

A.   Birthday

B.   Zipcode

C.   Birthyear

D.   Relationship status

E.   Latitude/Longitude

48:

Suppose there is an OpenSocial APT named 'Messages' which is integrated with the Google App Engine. Through which of the following API namespaces will OpenSocial app make calls and get data from API hosted on Google App Engine?

A.   gadgets.io.MethodType(get)

B.   gadgets.io.makeRequest

C.   OpenSocial.DataRequest

D.   OpenSocial.newDataRequest()

49:

What is the purpose of the "gadgets.util.escapeString" function?

A.   It is used to HTML decode the string.

B.   It is used to escape special characters in a string

C.   It is used to escape invalid string codes

D.   It is used to HTML encode the string

50:

Which of the following elements are present under tag?

A.   Require>

B.   script>

C.   Body>

D.   Optional>

E.   Locale>