| 14792 |
manas |
1 |
/**
|
|
|
2 |
* Copyright 2010-present Facebook.
|
|
|
3 |
*
|
|
|
4 |
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
5 |
* you may not use this file except in compliance with the License.
|
|
|
6 |
* You may obtain a copy of the License at
|
|
|
7 |
*
|
|
|
8 |
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
9 |
*
|
|
|
10 |
* Unless required by applicable law or agreed to in writing, software
|
|
|
11 |
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
12 |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
13 |
* See the License for the specific language governing permissions and
|
|
|
14 |
* limitations under the License.
|
|
|
15 |
*/
|
|
|
16 |
|
|
|
17 |
package com.facebook.internal;
|
|
|
18 |
|
|
|
19 |
|
|
|
20 |
import android.content.Context;
|
|
|
21 |
import android.os.Bundle;
|
|
|
22 |
|
|
|
23 |
/**
|
|
|
24 |
* com.facebook.internal is solely for the use of other packages within the Facebook SDK for Android. Use of
|
|
|
25 |
* any of the classes in this package is unsupported, and they may be modified or removed without warning at
|
|
|
26 |
* any time.
|
|
|
27 |
*/
|
|
|
28 |
|
|
|
29 |
/**
|
|
|
30 |
* This class executes service calls to fetch like-state of objects from the Facebook Application, if available.
|
|
|
31 |
*/
|
|
|
32 |
final class LikeStatusClient extends PlatformServiceClient {
|
|
|
33 |
private String objectId;
|
|
|
34 |
|
|
|
35 |
LikeStatusClient(Context context, String applicationId, String objectId) {
|
|
|
36 |
super(context, NativeProtocol.MESSAGE_GET_LIKE_STATUS_REQUEST, NativeProtocol.MESSAGE_GET_LIKE_STATUS_REPLY,
|
|
|
37 |
NativeProtocol.PROTOCOL_VERSION_20141001, applicationId);
|
|
|
38 |
|
|
|
39 |
this.objectId = objectId;
|
|
|
40 |
}
|
|
|
41 |
|
|
|
42 |
@Override
|
|
|
43 |
protected void populateRequestBundle(Bundle data) {
|
|
|
44 |
// Only thing we need to pass in is the object id.
|
|
|
45 |
data.putString(NativeProtocol.EXTRA_OBJECT_ID, objectId);
|
|
|
46 |
}
|
|
|
47 |
}
|
|
|
48 |
|