Yahoo YAP MCQs

Yahoo YAP MCQs

These Yahoo YAP multiple-choice questions and their answers will help you strengthen your grip on the subject of Yahoo YAP. You can prepare for an upcoming exam or job interview with these 40 Yahoo YAP MCQs.
So scroll down and start answering.

1: Which of the following YML tags is used to display both the name and picture of a users profile?

A.   yml:profile-pic

B.   yml:user-badge

C.   yml:share

D.   yml:friend-selector

2: What is the function of the chrome in Open Application?

A.   It enables the developer to edit Open Application code.

B.   It enables the end user to manage the Open Application.

C.   It enables the developer to publish Open Application over the Yahoo! Network.

D.   It enables the end user to receive Yahoo! users' updates as an event stream.

3: Which of the following application data parameters are correct for YAP?

A.   Supports 1024 bytes of data per key

B.   Supports 1 MB of data per application

C.   Supports 2048 bytes of data per key

D.   Supports 2 MB of data per application

4: Which of the following Yahoo! services must have read/write permissions if the Open Application wants to create an OpenSocial Activity?

A.   Yahoo! Profiles

B.   Yahoo! Contacts

C.   Yahoo! Updates

D.   Yahoo! Status

5: In Caja Runtime System, the real global objects are replaced by which of the following objects?

A.   USING__.[object]

B.   INCLUDE__.[object]

C.   OBJECT__.[object]

D.   IMPORTS__.[object]

6: If the Open Application is viewed by the user, what will the following yml:name code snippet display?

A.   It will display the name of the user.

B.   It will display the name of the user and link to the Profile page.

C.   It will display the word "You" instead of the name of the user.

D.   It will display the word "You" instead of the name of the user and link to the Profile page.

7: Which of the following HTML tags will be rejected by Caja?

A.   <base>

B.   <title>

C.   <body>

D.   <label>

8: Which of the following can be assigned read/write permissions in a YAP Open Application?

A.   Yahoo! Updates

B.   Yahoo! Contacts

C.   Yahoo! Profiles

9: Which of the following technologies is used by an Open Application for authorization?

A.   BOSS

B.   OAuth

C.   BBAuth

D.   OpenID

10: Which of the following statements regarding Caja are correct?

A.   Document.createElement is not supported.

B.   Https and mailto URLs are not supported.

C.   [ ] CSS selectors are not supported.

D.   new Function() declaration in JavaScript is not supported.

11: Which of the following files do you need to include to use the PHP SDK in your YAP Open Application?

A.   JSON.php

B.   OAuth.php

C.   YahooSessionStore.inc

D.   Yahoo.inc

12: Which of the following attributes does not belong to the yml:swf tag?

A.   salign

B.   params

C.   width

D.   minversion

13: Which of the following Response Codes denote OAuth authorization failure?

A.   200

B.   400

C.   401

D.   403

14: Which of the following code snippets does not comply with YML Syntax?

A.   <yml:ad network=dumyzone site=3600>

B.   <yml:a view="YahooFullView">Canvas View</yml:a>

C.   <yml:swf src="http://example.com/app.swf" width="780" height="1000" />

D.   <yml:if-env view="myview">Showing myview. </yml:if-env

15: What is the length of a GUID (Globally Unique Identifier) in YAP?

A.   16-byte-long string

B.   26-byte-long string

C.   6-byte-long string

D.   8-byte-long string

16: Which of the following OpenSocial person fields is supported by YAP?

A.   opensocial.DataRequest.PeopleRequestFields.FIRST

B.   opensocial.Person.Field.ADDRESSES

C.   opensocial.DataRequest.PeopleRequestFields

A.   yap_time

B.   yap_consumer_key

C.   yap_page_url

D.   yap_tz

18: Which of the following will work in Caja?

A.   node.firstchild DOM operation

B.   onClick HTML attribute

C.   window.setInterval Event

D.   event.fromElement

19: Which of the following static URL formats is used to view an Open Applications Canvas View, where appID is the Application ID of the Open Application to be viewed.

A.   http://apps.yahoo.com/-appID

B.   http://developer.yahoo.com/appID

C.   http://apps.yahoo.com/appID

D.   http://developer.yahoo.com/-appID

20: Which of the following image MIME types is not supported by YAP?

A.   tiff

B.   xpm

C.   rgb

D.   svg

21: Which of the following methods is supported by the set Small View Web Services?

A.   POST

B.   PUT

C.   HEAD

22: Which of the following PHP code snippets is used to redirect the user to Yahoo! to sign in and authorize the application?

A.   $presence = $yahoo_user->getPresence();

B.   $yahoo_user = $yahoo_session->getSessionedUser();

C.   $yahoo_session = YahooSession::requireSession(API_KEY, SHARED_SECRET);

D.   $user_profile = $yahoo_user->loadProfile();

23: Which of the following values is acceptable for the size attribute of the yml:ad tag?

A.   120x600

B.   320x240

C.   760x48

24: What is the value returned by the Environment.supportsField method if the specified field is supported by the OpenSocial container?

A.   Valid

B.   True

C.   1

D.   OK

25: What is the default value of the volume attribute of the yml:audio tag?

A.   0.6

B.   0.8

C.   0.7

D.   0.5

26: In which stage of the Open Application Workflow does an Open Application become installable on YAP, but is not directly discoverable by the general user?

A.   Development

B.   Pushed Live

C.   Published

D.   Installed

27: A PHP variable $yahoo_user stores the Yahoo! User object of a user. Which of the following PHP code snippets will be used to get the nickname of this particular user?

A.   $nickname = $yahoo_user->nickname;

B.   $nickname = $yahoo_user->loadProfile()->nickname;

C.   $nickname = $yahoo_user->getSessionedUser()->nickname;

D.   $nickname = $yahoo_user->getPresence()->nickname;

28: Which of the following tags can be used to create tabs in a YAP Open Application?

A.   yml:a

B.   yml:form

C.   yml:share

D.   yml:if-env

29: Which of the following languages are supported on the Small View of an Open Application?

A.   HTML

B.   YML

C.   XML

D.   PHP

30: Which of the following OpenSocial activity fields is not supported by YAP?

A.   opensocial.Activity.Field.ID

B.   opensocial.CreateActivityPriority.HIGH

C.   opensocial.Activity.Field.BODY

D.   opensocial.Activity.Field.POSTED_TIME

31: Read the following statements regarding Open Application and then choose the appropriate option from the list below.
Statement X: In Canvas View, HTML is sanitized to remove unsafe code.
Statement Y: In Small View, the code can be the subset of JavaScript allowed by Caja.

A.   Statement Y is correct and Statement X is incorrect.

B.   Statement X is correct and Statement Y is incorrect.

C.   Both Statements are correct.

D.   Both Statements are incorrect.

32: Which type of character encoding is used by YAP for both requests and responses?

A.   UTF-8

B.   UTF-16

C.   ASCII

D.   ISO 8859-1

33: Which of the following are valid attributes of the yml:friend-selector tag?

A.   bgcolor

B.   uid

C.   selected

D.   loop

34: Which of the following variables are passed by the YAP Engine to an Open Application at runtime?

A.   HTTP_USER_AGENT

B.   HTTP_ACCEPT_ENCODING

C.   oauth_signature

D.   yap_consumer_key

35: User information is contained in which of the following YAP parameters?

A.   yap_viewer_access_token

B.   yap_viewer_guid

C.   yap_tz

D.   yap_consumer_key

E.   a, b, and d

F.   b and c

36: Is the following statement true or false?
Caja line numbers remain unaltered when YML is used.

A.   True

B.   False

37: Which of the following statement(s) regarding Canvas View is/are correct?

A.   Canvas View is presented within an iframe.

B.   Canvas View size supports infinite width and height.

C.   Canvas View uses JavaScript sanatized by Caja.

D.   Canvas View does not support third-party advertisements and promotions.

38: Which of the following yml:pronoun attributes displays the pronouns "yourself," "himself," "herself," and "themselves"?

A.   possessive

B.   reflexive

C.   objective

D.   usethey

39: A shockwave file is to be included in an Open Application, but Caja does not support tags. Which of the following tags should be used instead?

A.   <yml:audio>

B.   <yml:share>

C.   <yml:swf>

D.   <yml:ad> 

40: Read the following statements regarding the setSmallview request body and then choose the appropriate option from the list below.
Statement X: Content-types are supported.
Statement Y: Content Encoding is honored.

A.   Statement X is correct.

B.   Statement Y is correct.

C.   Both statements are correct.

D.   Both statements are incorrect.

41: Is the following statement true or false?
Open Application uses OAuth with two-legged authorization.

A.   True

B.   False

42: What is the purpose of the Server-Side Translator in Caja?

A.   To check proper tagging of objects and functions

B.   To rewrite arbitrary HTML and JavaScript into safe HTML and JavaScript using white list security principles

C.   To create a sandbox environment

D.   To create proxy objects

43: Read the following statements regarding YAP Open Application and then choose the appropriate option from the list below.
Statement X: Consumer Key is the same for every application in YAP for a particular developer.
Statement Y: Consumer secret is unique for every application in YAP for a particular developer.

A.   Statement X is correct, and Statement Y is incorrect.

B.   Statement X is incorrect, and Statement Y is correct.

C.   Both statements are correct.

D.   Both statements are incorrect 

44: What would prompt the following Caja error message?
Not readable: ([Object]).foo

A.   Invalid declaration of variables

B.   Unsupported objects or variables

C.   Inclusion of external scripts

D.   Failure in loading the scriptÂ