A method comprising: by a first wireless device (104a, 304a) associated with a first user of a social-networking system, specifying a plurality of types of data (320, 321, 322); by the first wireless device (104a, 304a), for each type of data (320, 321, 322), specifying: - one or more users authorized to receive the type of data (320, 321, 322), wherein the authorized users are members of the social-networking system, wherein: the social-networking system comprises a social graph that comprises a plurality of nodes (1102, 1104) and a plurality of edges connecting the nodes, each node (1102, 1104) corresponding to a user or concept associated with the social-networking system; and each edge that connects two user nodes comprises an attribute corresponding to a relationship between the two user node; and each authorized user is determined based on one or more attributes of one or more edges between the authorized user and the first user; and - a distance (330, 331, 332) from the first wireless device (104a, 304a), wherein an authorized user of the one or more authorized users must be located within the distance (330, 331, 332) of the first wireless device (104a, 304a) in order to receive the type of data (320, 321, 322); and by the first wireless device (104a, 304a), sending first information of a first type of data such that the first information is only available to one or more second wireless devices (104b-d, 304b-d) respectively associated with one or more second users authorized to receive the first type of data and located within a first distance of the first wireless device (104a, 304a); wherein the data of the first data type is sent as part of a data encoding matrix, wherein the data encoding matrix comprises a first column vector corresponding to the data of the first data type and L redundant copies of another column vector corresponding to data of a second data type, wherein L is a positive integer. by a first wireless device (104a, 304a) associated with a first user of a social-networking system, specifying a plurality of types of data (320, 321, 322); by the first wireless device (104a, 304a), for each type of data (320, 321, 322), specifying: - one or more users authorized to receive the type of data (320, 321, 322), wherein the authorized users are members of the social-networking system, wherein: the social-networking system comprises a social graph that comprises a plurality of nodes (1102, 1104) and a plurality of edges connecting the nodes, each node (1102, 1104) corresponding to a user or concept associated with the social-networking system; and each edge that connects two user nodes comprises an attribute corresponding to a relationship between the two user node; and - one or more users authorized to receive the type of data (320, 321, 322), wherein the authorized users are members of the social-networking system, wherein: the social-networking system comprises a social graph that comprises a plurality of nodes (1102, 1104) and a plurality of edges connecting the nodes, each node (1102, 1104) corresponding to a user or concept associated with the social-networking system; and each edge that connects two user nodes comprises an attribute corresponding to a relationship between the two user node; and the social-networking system comprises a social graph that comprises a plurality of nodes (1102, 1104) and a plurality of edges connecting the nodes, each node (1102, 1104) corresponding to a user or concept associated with the social-networking system; and each edge that connects two user nodes comprises an attribute corresponding to a relationship between the two user node; and each authorized user is determined based on one or more attributes of one or more edges between the authorized user and the first user; and - a distance (330, 331, 332) from the first wireless device (104a, 304a), wherein an authorized user of the one or more authorized users must be located within the distance (330, 331, 332) of the first wireless device (104a, 304a) in order to receive the type of data (320, 321, 322); and by the first wireless device (104a, 304a), sending first information of a first type of data such that the first information is only available to one or more second wireless devices (104b-d, 304b-d) respectively associated with one or more second users authorized to receive the first type of data and located within a first distance of the first wireless device (104a, 304a); wherein - a distance (330, 331, 332) from the first wireless device (104a, 304a), wherein an authorized user of the one or more authorized users must be located within the distance (330, 331, 332) of the first wireless device (104a, 304a) in order to receive the type of data (320, 321, 322); and by the first wireless device (104a, 304a), sending first information of a first type of data such that the first information is only available to one or more second wireless devices (104b-d, 304b-d) respectively associated with one or more second users authorized to receive the first type of data and located within a first distance of the first wireless device (104a, 304a); wherein the data of the first data type is sent as part of a data encoding matrix, wherein the data encoding matrix comprises a first column vector corresponding to the data of the first data type and L redundant copies of another column vector corresponding to data of a second data type, wherein L is a positive integer.